public static function timestamp(): string
    {
        // 122192928000000000 is the number of 100-nanosecond intervals between
        // the UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00
        $offset = 122192928000000000;
        $timeofday = gettimeofday();

        $time = ($timeofday['sec'] * 10000000) + ($timeofday['usec'] * 10) + $offset;
        $hi = intval($time / 0xffffffff);

        $timestamp = [];
        $timestamp[] = sprintf('%04x', (($hi >> 16) & 0xfff));
        $timestamp[] = sprintf('%04x', $hi & 0xffff);
        $timestamp[] = sprintf('%08x', $time & 0xffffffff);

        return implode('', $timestamp);
    }