[OPUS]

System_time - A class for accessing the system clock.


Availability:

This class is available for the OPUS Blackboard API. The initial OPUS 2.0 release is described here

Constructors:
System_time( )
~System_time( )

Methods:
long( ) long conversion
operator=( ) assignment
str( ) get string time

Description

Class System_time generates a time stamp based on the time of construction. It provides a long conversion which returns its value in units of seconds since 00:00 Jan. 1, 1970, and a method to format the time in a string.

See Also:


System_time::System_time - The System_time constructor.

Synopsis


System_time::System_time()

Description

The constructor fetches the current system time and places it in the object.

Exceptions Thrown

none


System_time::~System_time - The System_time destructor.

Synopsis


System_time::~System_time()

Description

This method destroys the object.

Exceptions Thrown

none


System_time::operator= - System_time assignment.

Synopsis


System_time& System_time::operator=(
                                    const System_time& ot)

Description

This method assigns the time stamp in the argument to this object.

Returns

    a reference to the object

Exceptions Thrown

none


System_time::operator long() - Convert to type long

Synopsis


System_time::operator long() const

Description

This method converts the time stamp as a long value in units of seconds since the Epoch (00:00 January 1, 1970).

Returns

    long integer time in seconds since the Epoch (00:00 Jan. 1, 1970).

Exceptions Thrown

none


System_time::str - Get string representation of time.

Synopsis


string System_time::str() const

Description

This method Places the time value in a string and returns it.

Returns

    string containing time value

Exceptions Thrown

NONE


OPUS API index · STScI Home Page · Search · Topics · Index

Copyright © 1997-2000 The Association of Universities for Research in Astronomy, Inc. All Rights Reserved.


For more information, contact opushelp@stsci.edu

Last modified: 25 April 2000