---
name: "log4tango::TimeStamp"
section: "3"
platform: "linux"
package: "liblog4tango-doc"
version: "9.3.4+dfsg1-2+deb12u1"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/log4tango::TimeStamp"
---

# log4tango::TimeStamp(3)

## NAME

log4tango::TimeStamp

## SYNOPSIS

`#include <TimeStamp.hh>`

### Public Member Functions

**TimeStamp** ()\
 Constructs a **TimeStamp** representing 'now'.  **TimeStamp** (const **TimeStamp** &t)\
 Copy Constructor.  **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).  int **get\_seconds** (void) const\
 Returns the 'seconds' part of the **TimeStamp**.  int **get\_milliseconds** (void) const\
 Returns the 'subseconds' part of the **TimeStamp** in milliseconds, **get\_milliseconds()** == **get\_microseconds()** / 1000.  int **get\_microseconds** (void) const\
 Returns the subsecond part of the **TimeStamp** in microseconds.  void **operator=** (const **TimeStamp** &t)\
 Operator=.

### Static Public Member Functions

static const **TimeStamp** & **get\_start\_time** (void)\
 Returns a **TimeStamp** representing the time at which the application started.

### Protected Attributes

int **\_seconds**\
 int **\_micro\_seconds**\

### Static Protected Attributes

static **TimeStamp** **\_start\_stamp**\

## Constructor & Destructor Documentation

### log4tango::TimeStamp::TimeStamp ()

Constructs a **TimeStamp** representing 'now'.

### log4tango::TimeStamp::TimeStamp (const TimeStamp & t)` [inline]`

Copy Constructor.

### log4tango::TimeStamp::TimeStamp (unsigned int seconds, unsigned int microseconds = `0`)` [inline]`

Constructs a **TimeStamp** representing the given offset since the epoch ( 00:00:00 1970/1/1 UTC).

## Member Function Documentation

### int log4tango::TimeStamp::get\_microseconds (void) const` [inline]`

Returns the subsecond part of the **TimeStamp** in microseconds. The actual precision of this value depends on the platform and may be in the order of milliseconds rather than microseconds.

### int log4tango::TimeStamp::get\_milliseconds (void) const` [inline]`

Returns the 'subseconds' part of the **TimeStamp** in milliseconds, **get\_milliseconds()** == **get\_microseconds()** / 1000.

### int log4tango::TimeStamp::get\_seconds (void) const` [inline]`

Returns the 'seconds' part of the **TimeStamp**.

### static const TimeStamp & log4tango::TimeStamp::get\_start\_time (void)` [inline]`, ` [static]`

Returns a **TimeStamp** representing the time at which the application started.

### void log4tango::TimeStamp::operator= (const TimeStamp & t)` [inline]`

Operator=.

## Member Data Documentation

### int log4tango::TimeStamp::\_micro\_seconds` [protected]`

### int log4tango::TimeStamp::\_seconds` [protected]`

### TimeStamp log4tango::TimeStamp::\_start\_stamp` [static]`, ` [protected]`

## Author

Generated automatically by Doxygen for log4tango from the source code.
