Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
Public Member Functions | Private Attributes | List of all members
JSYSTEM::JLocalTime Struct Reference

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

#include <JTime.hh>

Public Member Functions

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

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 timeval t
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 52 of file JSystem/JTime.hh.

◆ tz

struct timezone JSYSTEM::JLocalTime::tz
private

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


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