log4cpp::TimeStamp(3)
๐ log4cpp::TimeStamp โ Library Functions Manual
okay bestie, buckle up, because we're about to make friends with log4cpp::TimeStamp โ literally just a simple TimeStamp abstraction, no cap. That's the whole vibe. It's the little class that knows what time it is (and, humble brag, when your app woke up). โจ
๐ธ NAME ๐ธ
log4cpp::TimeStamp โ a simple TimeStamp abstraction. That's it, that's the class, she's iconic and she knows it. ๐
โจ SYNOPSIS โจ
First things first, you gotta let her in:
#include <TimeStamp.hh>
๐ซถ Public Member Functions
TimeStamp ()โ constructs aTimeStamprepresenting 'now'. Like, right this second. Main character energy. โฐTimeStamp (unsigned int seconds, unsigned int microSeconds=0)โ constructs aTimeStamprepresenting the given offset since the epoch (00:00:00 1970/1/1 UTC). Yes, that epoch. The big one. ๐๏ธint getSeconds () constโ returns the'seconds'part of theTimeStamp. The chunky bit. ๐int getMilliSeconds () constโ returns the'subseconds'part of theTimeStampin milliseconds, and the math is literallygetMilliSeconds() == getMicroSeconds() / 1000. Slay, math ate. ๐งฎint getMicroSeconds () constโ returns the subsecond part of theTimeStampin microseconds. Tiny but fierce. ๐ฅ
๐ Static Public Member Functions
static const TimeStamp & getStartTime ()โ returns aTimeStamprepresenting the time at which the application started. It's giving "when did this whole era begin". ๐
๐ฆ Protected Attributes
int _secondsint _microSeconds
(the protected internals โ don't touch, they're shy ๐)
โญ Static Protected Attributes
static TimeStamp _startStamp
๐ Detailed Description ๐
A simple TimeStamp abstraction.
That's the official word. But between us? She's the girl who always knows what time it is, and honestly, we're obsessed. ๐
๐ Constructor & Destructor Documentation ๐
log4cpp::TimeStamp::TimeStamp ()
Constructs a TimeStamp representing 'now'. Zero arguments, maximum presence. โฑ๏ธ
log4cpp::TimeStamp::TimeStamp (unsigned int seconds, unsigned int microSeconds = 0)
Constructs a TimeStamp representing the given offset since the epoch (00:00:00 1970/1/1 UTC). You bring the seconds, she handles the rest. ๐๏ธโจ
๐ฅ Member Function Documentation ๐ฅ
int log4cpp::TimeStamp::getMicroSeconds () const [inline]
Returns the subsecond part of the TimeStamp in microseconds. BUT โ and this is the important bit, bestie โ the actual precision of this value depends on the platform and may be in the order of milliseconds rather than microseconds.
okay so lowkey: don't @ her about micro-precision, she's doing her best on whatever platform you dropped her on ๐ญ
int log4cpp::TimeStamp::getMilliSeconds () const [inline]
Returns the 'subseconds' part of the TimeStamp in milliseconds, and again, the golden equation: getMilliSeconds() == getMicroSeconds() / 1000. Memorize it, it's on the test. ๐
int log4cpp::TimeStamp::getSeconds () const [inline]
Returns the 'seconds' part of the TimeStamp. The big number. The whole seconds of it all. ๐ฐ๏ธ
const TimeStamp & log4cpp::TimeStamp::getStartTime () [inline], [static]
Returns a TimeStamp representing the time at which the application started. Like a birthday, but for your program. ๐ static, inline, and absolutely thriving.
๐ Member Data Documentation ๐
int log4cpp::TimeStamp::_microSeconds [protected]
The itty-bitty subsecond bit. Protected, so be respectful. ๐
int log4cpp::TimeStamp::_seconds [protected]
The seconds. Also protected. Also iconic. ๐
LOG4CPP_EXPORT TimeStamp log4cpp::TimeStamp::_startStamp [static], [protected]
The static, protected, exported start-of-it-all stamp. She's been here since the beginning and she's not leaving. ๐
๐ธ Author ๐ธ
Generated automatically by Doxygen for log4cpp from the source code.
(yes, a robot wrote it. a robot with taste, apparently. ๐ค๐)
okay that's the whole page, bestie โ go forth and timestamp responsibly ๐ซถ
log4cpp, Version 1.1 โ cute little sign-off from your favorite library, mwah ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 ยท LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 ยท LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 ยท LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 ยท LGPL-2.1-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms