网站首页  词典首页

请输入您要查询的函数:

 

术语 gettimesysinfo
释义 GetTimeSysInfo
语法:
C++
HRESULT __stdcall GetTimeSysInfoFunc(
__in TimeSysInfo eInfo,
__out PVOID pvInfo
);
GetTimeSysInfoFunc功能
检索系统时间的状态信息。
参数
eInfo [in]
要求的状态信息。此参数可以是下列值之一。
ValueMeaning
TSI_ClockPrecisionThe pvInfo参数是一个签署__int32值,指定的时钟精度log2秒。
TSI_ClockTickSizeThe pvInfo参数是一个无符号__int64值,指定的时钟滴答大小(10 ^ -7),秒。
TSI_CurrentTimeThe pvInfo参数是一个无符号__int64值,指定当前时间,在(10 ^ -7)表示,自上午12时00分过去了秒间隔1601年1月1日协调世界时(UTC)。
TSI_LastSyncTimeThe pvInfo参数是一个无符号__int64值,指定时间上同步,在(10 ^ -7)表示,自上午12点已过秒间隔1601年1月1日协调世界时(UTC)。
TSI_LeapFlagsThe pvInfo参数是一个字节值,表示即将发生的第二次飞跃或同步损失。下面的值定义:
0 -无变动
1 -添加闰秒
2 -减去闰秒
3 -不同步
TSI_PhaseOffsetThe pvInfo参数是一个签署__int64值,指定相位偏移来调整时钟以秒。
TSI_PollIntervalThe pvInfo参数是一个签署__int32值,指定在log2轮询间隔秒。
TSI_ReferenceIdentifierThe pvInfo参数是一个DWORD值,指定的时间源参考标识符NTP格式,(或者一个IP地址或四个字符的ASCII字符串,描述硬件源,如全球定位系统(GPS)或WWVB)。
TSI_RootDelayThe pvInfo参数是一个签署__int64值,指定根延误(10 ^ -7),秒。
TSI_RootDispersionThe pvInfo参数是一个无符号__int64值,指定,根分散,(10 ^ -7)秒。
TSI_StratumThe pvInfo参数是一个字节值,指定的网络跳数分开这台计算机从根源。硬件供应商应该返回零。 NTP的供应商应该返回同侪的阶层提供的样本。
TSI_TickCountThe pvInfo无符号的参数是一个__int64值,指定的滴答计数(自系统启动的毫秒数)。此值将最终包装,所以应该只用于比较短的间隔。
TSI_TSFlagsThe pvInfo参数是一个DWORD值,指定下列时间源标志之一:
TSF_Authenticated
TSF_Hardware
TSF_IPv6
pvInfo [out]
一个缓冲区,它接收的状态信息的指针。这一数据格式取决于eInfo价值。
返回值
如果函数成功,返回值为S_OK。否则,返回值是在Winerror.h中定义的错误代码之一。
备注
为了确保准确,提供的时间应检索所有与时间相关的信息使用GetTimeSysInfoFunc。 Note that the time values should not be used directly in an NTP packet.他们表示,相对于上午十二点00分1601年1月1日,而NTP的指定时间值来表示相对于上午12点1900年1月1日。
该TimeProvOpen函数返回一个指向这个功能。
实例
有关示例,请参见采样时间提供程序。
要求:
最低支持client-Windows XP
最低支持serverWindows服务器2003
HeaderTimeprov.h
参见
TimeProvOpen
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetTimeSysInfoFunc Function
Retrieves the system time state information.
Syntax
C++
HRESULT __stdcall GetTimeSysInfoFunc(
__in TimeSysInfo eInfo,
__out PVOID pvInfo
);
Parameters
eInfo [in]
Requested state information. This parameter can be one of the following values.
ValueMeaning
TSI_ClockPrecisionThe pvInfo parameter is a signed __int32 value that specifies the clock precision, in log2 seconds.
TSI_ClockTickSizeThe pvInfo parameter is an unsigned __int64 value that specifies the clock tick size, in (10^-7) seconds.
TSI_CurrentTimeThe pvInfo parameter is an unsigned __int64 value that specifies the current time, in (10^-7) second intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).
TSI_LastSyncTimeThe pvInfo parameter is an unsigned __int64 value that specifies the last synch time, in (10^-7) second intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).
TSI_LeapFlagsThe pvInfo parameter is a BYTE value that indicates an impending leap second or loss of synchronization. The following values are defined:
0 - No change
1 - Add leap second
2 - Subtract leap second
3 - Not synchronized
TSI_PhaseOffsetThe pvInfo parameter is a signed __int64 value that specifies the phase offset used to adjust the clock, in seconds.
TSI_PollIntervalThe pvInfo parameter is a signed __int32 value that specifies the poll interval, in log2 seconds.
TSI_ReferenceIdentifierThe pvInfo parameter is a DWORD value that specifies the reference identifier for the time source, in NTP format (either an IP address or a four character ASCII string that describes the hardware source, such as Global Positioning System (GPS) or WWVB).
TSI_RootDelayThe pvInfo parameter is a signed __int64 value that specifies the root delay, in (10^-7) seconds.
TSI_RootDispersionThe pvInfo parameter is an unsigned __int64 value that specifies, the root dispersion, in (10^-7) seconds.
TSI_StratumThe pvInfo parameter is a BYTE value that specifies the number of network hops that separate this computer from the root source. Hardware providers should return zero. NTP providers should return the stratum of the peer that provided the sample.
TSI_TickCountThe pvInfo parameter is an unsigned __int64 value that specifies the tick count (number of milliseconds since the system was started). This value will eventually wrap, so it should be used only to compare short intervals.
TSI_TSFlagsThe pvInfo parameter is a DWORD value that specifies one of the following time source flags:
TSF_Authenticated
TSF_Hardware
TSF_IPv6

pvInfo [out]
A pointer to a buffer that receives that state information. The format of this data depends on the value of eInfo.
Return Value
If the function succeeds, the return value is S_OK. Otherwise, the return value is one of the error codes defined in WinError.h.
Remarks
To ensure accuracy, the time provider should retrieve all time-related information using GetTimeSysInfoFunc. Note that the time values should not be used directly in an NTP packet. They are expressed relative to 12:00 A.M. January 1, 1601, whereas NTP specifies that time values be expressed relative to 12:00 A.M. January 1, 1900.
The TimeProvOpen function returns a pointer to this function.
Examples
For an example, see Sample Time Provider .
Requirements
Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
HeaderTimeprov.h
See Also
TimeProvOpen
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724416(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:22:36