Apache Log4cxx Version 1.1.0
Loading...
Searching...
No Matches
log4cxx::helpers::Date Class Reference

Simple transcoder for converting between external char and wchar_t strings and internal strings. More...

#include <date.h>

Inheritance diagram for log4cxx::helpers::Date:
log4cxx::helpers::Object

Public Types

typedef std::function< log4cxx_time_t()> GetCurrentTimeFn
 A function that will return the current time(in microseconds) when called.
 

Public Member Functions

 Date ()
 
 Date (log4cxx_time_t time)
 
virtual ~Date ()
 
log4cxx_time_t getTime () const
 
log4cxx_time_t getNextSecond () const
 Get start of next second.
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual const helpers::ClassgetClass () const =0
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Static Public Member Functions

static log4cxx_time_t getMicrosecondsPerDay ()
 
static log4cxx_time_t getMicrosecondsPerSecond ()
 
static log4cxx_time_t getCurrentTimeStd ()
 
static log4cxx_time_t currentTime ()
 
static void setGetCurrentTimeFunction (GetCurrentTimeFn fn)
 Set the function that is used to get the current time.
 

Detailed Description

Simple transcoder for converting between external char and wchar_t strings and internal strings.

Member Typedef Documentation

◆ GetCurrentTimeFn

typedef std::function<log4cxx_time_t()> log4cxx::helpers::Date::GetCurrentTimeFn

A function that will return the current time(in microseconds) when called.

Constructor & Destructor Documentation

◆ Date() [1/2]

log4cxx::helpers::Date::Date ( )

◆ Date() [2/2]

log4cxx::helpers::Date::Date ( log4cxx_time_t  time)

◆ ~Date()

virtual log4cxx::helpers::Date::~Date ( )
virtual

Member Function Documentation

◆ currentTime()

static log4cxx_time_t log4cxx::helpers::Date::currentTime ( )
static

◆ getCurrentTimeStd()

static log4cxx_time_t log4cxx::helpers::Date::getCurrentTimeStd ( )
static

◆ getMicrosecondsPerDay()

static log4cxx_time_t log4cxx::helpers::Date::getMicrosecondsPerDay ( )
static

◆ getMicrosecondsPerSecond()

static log4cxx_time_t log4cxx::helpers::Date::getMicrosecondsPerSecond ( )
static

◆ getNextSecond()

log4cxx_time_t log4cxx::helpers::Date::getNextSecond ( ) const

Get start of next second.

◆ getTime()

log4cxx_time_t log4cxx::helpers::Date::getTime ( ) const
inline

◆ setGetCurrentTimeFunction()

static void log4cxx::helpers::Date::setGetCurrentTimeFunction ( GetCurrentTimeFn  fn)
static

Set the function that is used to get the current time.

This is used only for testing purposes and should never be called under normal circumstances.

Parameters
fn

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