# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLNET::CUniTime Class Reference

This class provide a independant universal time system. More...

#include <unitime.h>

Inheritance diagram for NLNET::CUniTime

Inheritance graph
[legend]
Collaboration diagram for NLNET::CUniTime:

Collaboration graph
[legend]
List of all members.

Static Public Methods

NLMISC::TTime getUniTime ()
 Return the time in millisecond. This time is the same on all computers at the same moment. More...

const char* getStringUniTime ()
 Return the time in a string format to be display. More...

const char* getStringUniTime (NLMISC::TTime ut)
 Return the time in a string format to be display. More...

void syncUniTimeFromService (const CInetAddress *addr = NULL)
 You need to call this function before calling getUniTime or an assert will occured. More...

void installServer (CCallbackServer *server)
 Call this function in the init part of the front end service to enable time syncro between shard and clients. More...

void syncUniTimeFromServer (CCallbackClient *client)
 Call this functions in the init part of the client side to synchronize between client and shard. More...

void setUniTime (NLMISC::TTime uTime, NLMISC::TTime lTime)
 

For internal use only. More...

void setUniTime (NLMISC::TTime uTime)
 \internal. More...


Static Public Attributes

bool Sync = false

Static Private Attributes

NLMISC::TTime _SyncUniTime = 0
NLMISC::TTime _SyncLocalTime = 0

Detailed Description

This class provide a independant universal time system.

Author(s):
Vianney Lecroart , Nevrax France
Date:
2000

Definition at line 46 of file unitime.h.


Member Function Documentation

const char * NLNET::CUniTime::getStringUniTime ( NLMISC::TTime ut ) [static]
 

Return the time in a string format to be display.

Definition at line 90 of file unitime.cpp.

const char * NLNET::CUniTime::getStringUniTime ( ) [static]
 

Return the time in a string format to be display.

Definition at line 84 of file unitime.cpp.

TTime NLNET::CUniTime::getUniTime ( ) [static]
 

Return the time in millisecond. This time is the same on all computers at the same moment.

Definition at line 74 of file unitime.cpp.

void NLNET::CUniTime::installServer ( CCallbackServer * server ) [static]
 

Call this function in the init part of the front end service to enable time syncro between shard and clients.

Definition at line 250 of file unitime.cpp.

void NLNET::CUniTime::setUniTime ( NLMISC::TTime uTime ) [static]
 

\internal.

Definition at line 67 of file unitime.cpp.

void NLNET::CUniTime::setUniTime ( NLMISC::TTime uTime,
NLMISC::TTime lTime ) [static]
 

For internal use only.

Definition at line 49 of file unitime.cpp.

void NLNET::CUniTime::syncUniTimeFromServer ( CCallbackClient * client ) [static]
 

Call this functions in the init part of the client side to synchronize between client and shard.

client is the connection between the client and the front end. The connection must be established before calling this function.

Definition at line 278 of file unitime.cpp.

void NLNET::CUniTime::syncUniTimeFromService ( const CInetAddress * addr = NULL ) [static]
 

You need to call this function before calling getUniTime or an assert will occured.

This function will connect to the time service and synchronize your computer. This function assumes that all services run on server that are time synchronized with NTP for example. If addr is NULL, the function will connect to the Time Service via the Naming Service. In this case, the CNamingClient must be connected to a Naming Service. This function can be called *ONLY* by services that are inside of the shard. Don't use it for a client or a service outside of the shard.

Definition at line 144 of file unitime.cpp.


Member Data Documentation

bool NLNET::CUniTime::Sync = false [static]
 

Definition at line 46 of file unitime.cpp.

TTime NLNET::CUniTime::_SyncLocalTime = 0 [static, private]
 

Definition at line 45 of file unitime.cpp.

TTime NLNET::CUniTime::_SyncUniTime = 0 [static, private]
 

Definition at line 44 of file unitime.cpp.


The documentation for this class was generated from the following files: