Goal Sync the time with a server
Completion time 30min
Skills needed Javascript skills. Preferable used nodejs before

TODO: VIDEO

Intro and concept

Handy_Illustration_TimeSyncAndFunctions_TimeSync1.jpg

In order to make things move in synchronization, we must have a common agreement on what time it is. All connected nodes syncs against the handyfeeling server clock and share that time when sending timed functions, like playing a video in sync.

Good news! The time synchronization is handled by the Handy SDK . You only need to handle time synchronization if you make a non-javascript application.

Math

Handy_Illustration_TimeSyncAndFunctions_TimeSync2.jpg

All times are in milliseconds [ms].

$\hat{T}$ = Estimated servertime when Tend (client)

$T_{start}$ = System time on sending the servertime request to the server (client)

$T_{end}$ = System time on the reply from the server received (client)

$T_{server}$= System time on server when replying to a servertime request (server)

$T_{client}$ = System time on the client at any given time (client)

$\hat{T}_{offset}$= Estimated offset between system time and the server time (client)