Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JSYSTEM::JLocalTime Struct Reference

Auxililary class to local get time in micro seconds. More...

#include <JTime.hh>

Public Member Functions

 JLocalTime ()
 Default constructor.
 
localtime_t operator() () const
 Get local time in micro seconds.
 

Private Attributes

localtime_t usec
 
struct timeval t
 
struct timezone tz
 

Detailed Description

Auxililary class to local get time in micro seconds.

Definition at line 27 of file JSystem/JTime.hh.

Constructor & Destructor Documentation

◆ JLocalTime()

JSYSTEM::JLocalTime::JLocalTime ( )
inline

Default constructor.

Definition at line 31 of file JSystem/JTime.hh.

32 {}

Member Function Documentation

◆ operator()()

localtime_t JSYSTEM::JLocalTime::operator() ( ) const
inline

Get local time in micro seconds.

Returns
time [us]

Definition at line 40 of file JSystem/JTime.hh.

41 {
42 gettimeofday(&t, &tz);
43
44 usec = t.tv_sec;
45 usec *= 1000000ULL;
46 usec += t.tv_usec;
47
48 return usec;
49 }
struct timezone tz

Member Data Documentation

◆ usec

localtime_t JSYSTEM::JLocalTime::usec
mutableprivate

Definition at line 52 of file JSystem/JTime.hh.

◆ t

struct timeval JSYSTEM::JLocalTime::t
private

Definition at line 53 of file JSystem/JTime.hh.

◆ tz

struct timezone JSYSTEM::JLocalTime::tz
private

Definition at line 54 of file JSystem/JTime.hh.


The documentation for this struct was generated from the following file: