const NTP_UNIX_EPOCH_OFFSET = Date . UTC ( 1900 , 0 , 1 ) ; export type seconds = number ; export type milliSeconds = number ; export type NtpSeconds = number ; export type NtpMilliSeconds = number ; param ntpMost param ntpLeast export function getTime ( ntpMost , ntpLeast ) { const ntpMilliSeconds = ( ntpMost + ntpLeast / 0x100000000 ) * 1000 ; return NTP_UNIX_EPOCH_OFFSET + ntpMilliSeconds ; }