GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
tai(3) FreeBSD Library Functions Manual tai(3)

tai - manipulate times with 1-second precision

#include <tai.h>

double tai_approx(&t);

int tai_less(&a,&b);
void tai_add(&t,&a,&b);
void tai_sub(&t,&a,&b);

struct tai t;
struct tai a;
struct tai b;

A struct tai stores an integer between 0 inclusive and 2^64 exclusive. The format of struct tai is designed to speed up common operations; applications should not look inside struct tai.

A struct tai variable is commonly used to store a TAI64 label. Each TAI64 label refers to one second of real time. TAI64 labels span a period of hundreds of billions of years. See http://pobox.com/~djb/proto/tai64.txt for more information.

A struct tai variable may also be used to store the numerical difference between two TAI64 labels.

tai_approx returns a double-precision approximation to t. The result of tai_approx is always nonnegative.

tai_less returns 1 if a is smaller than b, 0 otherwise.

tai_add adds a and b modulo 2^64 and puts the result into t. The inputs and outputs may overlap.

tai_sub subtracts b from a modulo 2^64 and puts the result into t. The inputs and outputs may overlap.

tai_now(3), tai_pack(3), taia(3), utc(3)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.