National Instruments Binary Time Format
- Updated2023-02-21
- 1 minute(s) read
National Instruments Binary Time Format
Use National Instruments Binary Time Format (NI-BTF) if you need a finer resolution than other date-time types, need a platform-neutral date-time type, or want to share date-time information with other NI application development environments. The resolution for NI-BTF is 2-64 seconds. NI-BTF stores time values in Coordinated Universal Time (UTC) format.
The CVI Time functions in the Utility Library and the Time Conversions functions in the Programmer's Toolbox provide the ability to interact with NI-BTF. Use the CVI Time functions to manipulate absolute calendar times and time intervals. Use the Time Conversions functions to convert LabWindows/CVI ANSI C Library, User Interface Library, Network Variable Library, and FILETIME time values to and from NI-BTF.
NI-BTF uses a CVITime structure, which is defined as follows:
typedef struct
{
unsigned __int64 lsb; /* positive fractions (2-64) of a second */
__int64 msb; /* number of whole seconds after 12:00 a.m., Friday, January 1, 1904, Universal Time */
} CVITime;
The absolute time and time interval parameters of the CVI Time and Time Conversions functions accept values of type CVIAbsoluteTime and CVITimeInterval. CVIAbsoluteTime is defined as follows:
typedef union CVIAbsoluteTime
{
CVITime cviTime;
unsigned int u32Data[4];
} CVIAbsoluteTime;
CVITimeInterval is defined as follows:
typedef union CVITimeInterval
{
CVITime cviTime;
unsigned int u32Data[4];
} CVITimeInterval;
Time interval values can be negative values.