AgsTimestamp

AgsTimestamp — Timestamp unix and alike

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsTimestampFlags
    GObject
    ╰── AgsTimestamp

Includes

#include <ags/thread/ags_timestamp.h>

Description

AgsTimestamp measure of time.

Functions

AGS_TIMESTAMP_GET_OBJ_MUTEX()

#define AGS_TIMESTAMP_GET_OBJ_MUTEX(obj) (&(((AgsTimestamp *) obj)->obj_mutex))

ags_timestamp_test_flags ()

gboolean
ags_timestamp_test_flags (AgsTimestamp *timestamp,
                          AgsTimestampFlags flags);

Test flags to be set.

Parameters

timestamp

the AgsTimestamp

 

flags

the flags

 

Returns

if flags set returning TRUE otherwise FALSE

Since: 3.0.0


ags_timestamp_set_flags ()

void
ags_timestamp_set_flags (AgsTimestamp *timestamp,
                         AgsTimestampFlags flags);

Set flags of timestamp .

Parameters

timestamp

the AgsTimestamp

 

flags

the flags

 

Since: 3.0.0


ags_timestamp_unset_flags ()

void
ags_timestamp_unset_flags (AgsTimestamp *timestamp,
                           AgsTimestampFlags flags);

Unset flags of timestamp .

Parameters

timestamp

the AgsTimestamp

 

flags

the flags

 

Since: 3.0.0


ags_timestamp_get_unix_time ()

time_t
ags_timestamp_get_unix_time (AgsTimestamp *timestamp);

Get unix time.

Parameters

timestamp

the AgsTimestamp

 

Returns

the unix time as time_t value

Since: 3.0.0


ags_timestamp_set_unix_time ()

void
ags_timestamp_set_unix_time (AgsTimestamp *timestamp,
                             time_t unix_time);

Set unix time.

Parameters

timestamp

the AgsTimestamp

 

unix_time

the unix time value

 

Since: 3.0.0


ags_timestamp_get_ags_offset ()

guint64
ags_timestamp_get_ags_offset (AgsTimestamp *timestamp);

Get AGS offset.

Parameters

timestamp

the AgsTimestamp

 

Returns

the AGS offset as unsigned 64 bit integer

Since: 3.0.0


ags_timestamp_set_ags_offset ()

void
ags_timestamp_set_ags_offset (AgsTimestamp *timestamp,
                              guint64 ags_offset);

Set AGS offset as unsigned 64 bit integer.

Parameters

timestamp

the AgsTimestamp

 

ags_offset

the AGS offset

 

Since: 3.0.0


ags_timestamp_new ()

AgsTimestamp *
ags_timestamp_new ();

Creates an AgsTimestamp

Returns

a new AgsTimestamp

Since: 3.0.0

Types and Values

enum AgsTimestampFlags

Enum values to control the behavior or indicate internal state of AgsTimestamp by enable/disable as sync_flags.

Members

AGS_TIMESTAMP_UNIX

unix timestamp is used

 

AGS_TIMESTAMP_OFFSET

internal offset is used

 

AGS_TIMESTAMP_OUTDATED

the timestamp is outdated