Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWTime
Synopsis
Description
Persistence
Example
Public Constructors
Public Member Operators
Public Member Functions
Static Public Member Functions
Related Global Operators
Synopsis
#include <rw/rwtime.h>
RWTime a; // Construct with current time
Description
Class RWTime represents a time, stored as the number of seconds since 00:00:00 January 1,
1901 UTC. See Section 8 for how to set the time zone for your compiler. Failure to do this may
result in UTC (GMT) times being wrong.
Output formatting is done using an RWLocale object. The default locale formats according to
U.S. conventions.
Note that because the default constructor for this class creates an instance holding the current
date and time, constructing a large array of RWTime may be slow.
RWTime v[5000]; // Figures out the current time 5000 times
Those with access to the C++ Standard Library-based versions of the Tools.h++ template
collections should consider the following:
// Figures out the current time just once: