System Class Reference

List of all members.

Static Public Member Functions

int64_t currentTimeMillis ()
String getProperty (const String &key)
void setProperty (const String &key, const String &value)

Detailed Description

The System class contains several useful class fields and methods. It cannot be instantiated.


Member Function Documentation

int64_t currentTimeMillis  )  [static]
 

Returns the current time in milliseconds since midnight (0 hour), January 1, 1970.

Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.

Returns:
the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

String getProperty const String &  key  )  [static]
 

Gets the system property indicated by the specified key.

Parameters:
key the name of the system property.
Returns:
the string value of the system property, or the default value if there is no property with that key.
Exceptions:
IllegalArgumentException if key is empty.

void setProperty const String &  key,
const String &  value
[static]
 

Sets the system property indicated by the specified key.

Parameters:
key the name of the system property.
value the value of the system property.
Exceptions:
IllegalArgumentException if key is empty.


The documentation for this class was generated from the following files:
  • system.h
  • system.cpp

Copyright © 1999-2004, Apache Software Foundation