log4cpp::TimeStamp(3)

๐Ÿ“ฆ
version 1.1.4 ยท 4 versions
, in opensuse-leap 16.0

๐Ÿ’… 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 a TimeStamp representing 'now'. Like, right this second. Main character energy. โฐ
  • 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). Yes, that epoch. The big one. ๐Ÿ—“๏ธ
  • int getSeconds () const โ€” returns the 'seconds' part of the TimeStamp. The chunky bit. ๐Ÿ’œ
  • int getMilliSeconds () const โ€” returns the 'subseconds' part of the TimeStamp in milliseconds, and the math is literally getMilliSeconds() == getMicroSeconds() / 1000. Slay, math ate. ๐Ÿงฎ
  • int getMicroSeconds () const โ€” returns the subsecond part of the TimeStamp in microseconds. Tiny but fierce. ๐Ÿ”ฅ

๐ŸŒˆ Static Public Member Functions

  • static const TimeStamp & getStartTime () โ€” returns a TimeStamp representing the time at which the application started. It's giving "when did this whole era begin". ๐Ÿ‘‘

๐Ÿฆ‹ Protected Attributes

  • int _seconds
  • int _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