NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
Classes | Functions | Variables
BiometricEvaluation::Time Namespace Reference

Support for time and timers. More...

Classes

class  Timer
 This class can be used by applications to report the amount of time a block of code takes to execute. More...
 
class  Watchdog
 A Watchdog object can be used by applications to limit the amount of processing time taken by a block of code. More...
 

Functions

std::string getCurrentTime ()
 
std::string getCurrentDate ()
 
std::string getCurrentDateAndTime ()
 
std::string getCurrentCalendarInformation (const std::string &formatString)
 Obtain customized calendar information. More...
 
std::string put_time (const struct tm *tmb, const char *fmt)
 Manual implementation of std::put_time. More...
 
std::ostream & operator<< (std::ostream &s, const Timer &timer)
 Output stream operator overload for Timer. More...
 
void WatchdogSignalHandler (int signo, siginfo_t *info, void *uap)
 

Variables

const uint64_t OneSecond = 1000000
 
const uint64_t OneHalfSecond = 500000
 
const uint64_t OneQuarterSecond = 250000
 
const uint64_t OneEighthSecond = 125000
 
const int NanosecondsPerMicrosecond = 1000
 
const int MicrosecondsPerSecond = 1000000
 
const int MicrosecondsPerMillisecond = 1000
 
const int MillisecondsPerSecond = 1000
 

Detailed Description

Support for time and timers.

The Time package gathers all timing relating matters, such as Timers, Watchdog timers, etc. Time values are in microsecond units.

Function Documentation

◆ getCurrentTime()

std::string BiometricEvaluation::Time::getCurrentTime ( )
Returns
The current ISO 8601 time as a string.

◆ getCurrentDate()

std::string BiometricEvaluation::Time::getCurrentDate ( )
Returns
The current ISO 8601 date as a string.

◆ getCurrentDateAndTime()

std::string BiometricEvaluation::Time::getCurrentDateAndTime ( )
Returns
The standard locale current date and time as a string.

◆ getCurrentCalendarInformation()

std::string BiometricEvaluation::Time::getCurrentCalendarInformation ( const std::string &  formatString)

Obtain customized calendar information.

Parameters
formatStringA C++11 put_time-compatible format string.
Returns
The current calendar information formatted as specified in formatString.
Note
Return value is undefined if format string is invalid.

◆ put_time()

std::string BiometricEvaluation::Time::put_time ( const struct tm *  tmb,
const char *  fmt 
)

Manual implementation of std::put_time.

Note
Exists because g++ does not currently implement put_time (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54354)

◆ operator<<()

std::ostream & BiometricEvaluation::Time::operator<< ( std::ostream &  s,
const Timer timer 
)

Output stream operator overload for Timer.

Parameters
sStream to append.
timerTimer whose elapsed time in microseconds should be appended to s.
Returns
s with value of elapsedStr() appended.
Exceptions
BE::Error::StrategyErrorPropagated from elapsedStr().

◆ WatchdogSignalHandler()

void BiometricEvaluation::Time::WatchdogSignalHandler ( int  signo,
siginfo_t *  info,
void *  uap 
)

Variable Documentation

◆ OneSecond

const uint64_t BiometricEvaluation::Time::OneSecond = 1000000

Definition at line 29 of file be_time.h.

◆ OneHalfSecond

const uint64_t BiometricEvaluation::Time::OneHalfSecond = 500000

Definition at line 30 of file be_time.h.

◆ OneQuarterSecond

const uint64_t BiometricEvaluation::Time::OneQuarterSecond = 250000

Definition at line 31 of file be_time.h.

◆ OneEighthSecond

const uint64_t BiometricEvaluation::Time::OneEighthSecond = 125000

Definition at line 32 of file be_time.h.

◆ NanosecondsPerMicrosecond

const int BiometricEvaluation::Time::NanosecondsPerMicrosecond = 1000

Definition at line 33 of file be_time.h.

◆ MicrosecondsPerSecond

const int BiometricEvaluation::Time::MicrosecondsPerSecond = 1000000

Definition at line 34 of file be_time.h.

◆ MicrosecondsPerMillisecond

const int BiometricEvaluation::Time::MicrosecondsPerMillisecond = 1000

Definition at line 35 of file be_time.h.

◆ MillisecondsPerSecond

const int BiometricEvaluation::Time::MillisecondsPerSecond = 1000

Definition at line 36 of file be_time.h.