Forwarded message: From: Self <fine> To: Rutger van der Eijk <r36@nikhef.nl> Subject: Re: system time Reply-to: fine@mail.cern.ch Date: Fri, 2 Oct 1998 10:21:44 -0500 On 2 Oct 98 at 13:39, Rutger van der Eijk wrote: > Small question, > > Is there a general way to ask the 'system time' (date and time )to > some root system class? (TSystem?) I could use some 'standard' unix > routines but i would prefer to use something platform independed. > > I see a TSystem::now() but I'm not sure if I should use this one... > (it returns millisec... is this relative to something???) ===> static Double_t TStopwatch::GetRealTime(); return the "Real time" but for UNIX: since last system boot (via timest) for NT : since January 1, 1601 (via GetSystemTime(...) ) for VMS ; whatever "clock()" for VMS does return Since Stopwatch::GetRealTime is a static one it can be called with no TStopwatch instance. ===> TDatime::Set() // Set Date/Time to current time as reported by the system. // Date and Time are encoded into one single unsigned 32 bit word. // Date is stored with the origin being the 1st january 1995. // Time has 1 second precision. Valery ================================================================= Dr. Valery Fine Telex : 911621 dubna su ----------- LCTA/Joint Inst.for NuclearRes Phone : +7 09621 6 40 80 141980 Dubna, Moscow region Fax : +7 09621 6 51 45 Russia mailto:fine@main1.jinr.dubna.su Dr. Valeri Faine ------------ Phone: +41 22 767 6468 CERN FAX : +41 22 767 7910 CH-1211 Geneva, 23 mailto:fine@mail.cern.ch Switzerland http://nicewww.cern.ch/~fine
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:38 MET