潜望镜时间戳

编程入门 行业动态 更新时间:2024-10-08 22:58:27
本文介绍了潜望镜时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我执行以下请求:POST signer.periscope.tv/sign HTTP在/1.1应用程式潜望镜它生成3时间戳。

When I perform the following request: POST signer.periscope.tv/sign HTTP/1.1 in Periscope app it generates 3 timestamps.

下面是那些时间戳的3个例子,但我想不出他们的意思。

Below are 3 examples of those timestamps, but I can't figure out what they mean.

我知道,3号永远是Linux的时间戳,但什么是1安培; 2,他们如何与Linux的时间戳?

I know that number 3 is always the Linux timestamp, but what are 1 & 2 and how are they related to the Linux timestamp?

什么是tpForBroadcasterFrame和时间戳是如何关联的?

What is "tpForBroadcasterFrame" and how is related to timestamp?

  • 1 ntpForBroadcasterFrame:15704244410975025152
  • 2 ntpForLiveFrame:15704244125303865344
  • 3时间戳:1447440545

  • 1 ntpForBroadcasterFrame: 15704244410975025152
  • 2 ntpForLiveFrame : 15704244125303865344
  • 3 timestamp : 1447440545

3时间戳:1447440553

3 timestamp : 1447440553

推荐答案

前两个看起来是网络时间协议的时间戳。第三个是更正确地称为POSIX时间戳。

The first two look to be Network Time Protocol time stamps. The third one is more correctly called a POSIX timestamp.

在一个无符号的64位整数,再presents自1900年以来的秒32位,小数秒32位NTP存储数据,所以......

NTP stores data in an unsigned 64 bit integer that represents 32 bits of seconds since 1900 and 32 bits of fractional seconds, so...

屏蔽关的15704244410975025152前32位给出了3656429334秒自1900年以来其他32位都没有映射到POSIX时间戳作为它的最小分辨率为1秒。

Masking off the first 32 bits of 15704244410975025152 gives 3656429334 seconds since 1900. The other 32 bits have no mapping to a POSIX timestamp as its minimum resolution is 1 second.

减去2208988800,the 1900年到1970年之间的秒数,从3656429334给人1447440534秒因为POSIX的时代,或星期五,2015年11月13日18时48分54秒GMT

Subtracting 2208988800, the number of seconds between 1900 and 1970, from 3656429334 gives 1447440534 seconds since the Posix epoch, or Fri, 13 Nov 2015 18:48:54 GMT

快速劈code:

#include <iostream> constexpr uint64_t epochdelta = 2208988800L; // number of seconds between 1900 and 1970 int main() { uint64_t num= 15704244410975025152ULL; uint32_t seconds = (uint32_t)(num >> 32); std::cout << seconds << " seconds since 1900" << std::endl; std::cout << seconds - epochdelta << " seconds since 1970" << std::endl; return 0; }

更多推荐

潜望镜时间戳

本文发布于:2023-11-22 00:33:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1615288.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:潜望镜   时间

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!