The Fast Time package allows the caller to find out the current time of day without incurring the expense of a kernel call. It works by mapping the page of the kernel that has the kernels time-of-day variable and examining it directly. Currently, this package only works on Suns. You may call the routines on other machines, but they will run more slowly.
The initialization routine for this package is fairly expensive
since it does a lookup of a kernel symbol via nlist (). If you have
a program which runs for only a short time, you may wish to call
@FT(Init) with the
notReally
parameter true to prevent
the lookup from taking place. This is useful if you are using
another package that uses Fast Time (such as RPC2).
int FT_Init( in int printErrors > , @w < in int notReally )
Print error messages on stderr if somethingn goes wrong
Dont really do the memory mapping. Make FT_GetTimeOfDay
No problems
Error in initialization
This call mmaps the kernel page with the time of day variable. If the routine returns -1, calls to FT_GetTimeOfDay will still work properly, but will make a kernel call. )
int FTGetTimeOfDay( )
Where to put the time of day
Where to put the time zone information
No problem
Something went wrong
This function has the same calling sequence as the kernels gettimeofday routine. If the tz parameter is not zero, or if initialization failed, or if the notReally parameter in the initialization was true, then this routine calls gettimeofday . Otherwise, it looks in the mapped page of the kernel to get the time of day. >