Skip to content

PtpTimestamp

  • Device and sensor time on industrial networks: Precision Time Protocol timestamps, which count TAI, and the UTC offset a grandmaster announces.

A PTP (IEEE 1588) timestamp: 32 bits of nanoseconds and 48 bits (80 - 32) of whole seconds, 80 bits in all (RFC 8877 section 4.3).

import type { PtpTimestamp } from "@northguild/gmt";
MemberTypeDescription
secondsbigintWhole TAI seconds since 1970-01-01T00:00:00 TAI: an integer from 0 to 2^48 - 1.
nanosecondsnumberNanoseconds past seconds: an integer from 0 to 999 999 999.
interface PtpTimestamp {
/** Whole TAI seconds since 1970-01-01T00:00:00 TAI: an integer from 0 to 2^48 - 1. */
seconds: bigint;
/** Nanoseconds past `seconds`: an integer from 0 to 999 999 999. */
nanoseconds: number;
}

types/ptp.ts

© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.