DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
No more ctime(3C) errors - Time(3C++)

Conversion to and from time_t

As mentioned earlier, time_t is both (1) the standard UNIX System representation for absolute time, and (2) the type used internally to represent Time values. As such, the ``conversion'' to and from time_t values is particularly simple: function make_time() simply returns the Time with a given internal representation, while make_time_t() simply returns the internal representation of a given Time.

make_time() can be used to obtain the current Time by using the system call time(2) as follows:

       Time now = make_time(time(0));

Next topic: Auxiliary Time functions
Previous topic: Stream insertion

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004