top | up | prev | next

TimestampProvider Class

Definition at line 388 of Time.cpp

Constructors

TimestampProvider()

Member Functions

void Done() static
Timestamp GetCurrentTimestamp()
void Init() static
TimestampProvider& Instance() static
void Reset()

Member Variables

std::unique_ptr<TimestampProvider> instance static
DateTime startDateTime
std::chrono::steady_clock::time_point startTimePoint

Constructor Details

TimestampProvider Constructor

soulng::util::TimestampProvider::TimestampProvider()

Definition at line 421 of Time.cpp :
421 : startDateTime()startTimePoint()
422 {
423     Reset();
424 }


Declaration at line 397 of Time.cpp


Member Function Details

Done Member Function

void soulng::util::TimestampProvider::Done() static

Definition at line 410 of Time.cpp :
411 {
412     instance.reset();
413 }


Declaration at line 392 of Time.cpp


GetCurrentTimestamp Member Function

Timestamp soulng::util::TimestampProvider::GetCurrentTimestamp()

Definition at line 426 of Time.cpp
Declaration at line 394 of Time.cpp

Calls: soulng::util::Date::AddDays , soulng::util::DateTime::GetDate , soulng::util::DateTime::Seconds , soulng::util::TimestampProvider::Reset


Init Member Function

void soulng::util::TimestampProvider::Init() static

Definition at line 405 of Time.cpp :
406 {
407     instance.reset(new TimestampProvider());
408 }


Declaration at line 391 of Time.cpp


Instance Member Function

TimestampProvider & soulng::util::TimestampProvider::Instance() static

Definition at line 393 of Time.cpp :
393 { return *instance; }


Reset Member Function

void soulng::util::TimestampProvider::Reset()

Definition at line 415 of Time.cpp :
416 {
417     startDateTime = GetCurrentDateTime();
418     startTimePoint = std::chrono::steady_clock::now();
419 }


Declaration at line 400 of Time.cpp

Called by: soulng::util::TimestampProvider::GetCurrentTimestamp


top | up | prev | next