## ZeitgeistTimeRange ZeitgeistTimeRange — Immutable representation of an interval in time, marked by a beginning and an end |

## Synopsis

    #define             ZEITGEIST_TYPE_TIME_RANGE
    GVariant *          zeitgeist_time_range_to_variant     (ZeitgeistTimeRange *self);
    ZeitgeistTimeRange * zeitgeist_time_range_intersect     (ZeitgeistTimeRange *self,
                                                             ZeitgeistTimeRange *time_range);
    ZeitgeistTimeRange * zeitgeist_time_range_new           (gint64 start_msec,
                                                             gint64 end_msec);
    ZeitgeistTimeRange * zeitgeist_time_range_new_anytime   (void);
    ZeitgeistTimeRange * zeitgeist_time_range_new_to_now    (void);
    ZeitgeistTimeRange * zeitgeist_time_range_new_from_now  (void);
    ZeitgeistTimeRange * zeitgeist_time_range_new_from_variant
                                                            (GVariant *variant,
                                                             GError **error);
    gint64              zeitgeist_time_range_get_start      (ZeitgeistTimeRange *self);
    gint64              zeitgeist_time_range_get_end        (ZeitgeistTimeRange *self);
    struct              ZeitgeistTimeRange;
    struct              ZeitgeistTimeRangeClass;

## Object Hierarchy

      GObject
       +----ZeitgeistTimeRange

## Properties

      "end"                      gint64                : Read
      "start"                    gint64                : Read

## Description

A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.

## Details

### ZEITGEIST_TYPE_TIME_RANGE

    #define ZEITGEIST_TYPE_TIME_RANGE (zeitgeist_time_range_get_type ())

The type for ZeitgeistTimeRange.

### zeitgeist_time_range_to_variant ()

    GVariant *          zeitgeist_time_range_to_variant     (ZeitgeistTimeRange *self);

`self` : | the ZeitgeistTimeRange instance
Returns : | a new variant holding the time range

### zeitgeist_time_range_intersect ()

    ZeitgeistTimeRange * zeitgeist_time_range_intersect     (ZeitgeistTimeRange *self,
                                                             ZeitgeistTimeRange *time_range);

Check whether two time ranges are intersecting.

`self` : | the ZeitgeistTimeRange instance
`time_range` : | . the second time range to compare with. [in]
Returns : | a new time range representing the intersection

### zeitgeist_time_range_new ()

    ZeitgeistTimeRange * zeitgeist_time_range_new           (gint64 start_msec,
                                                             gint64 end_msec);

`start_msec` : | . starting timestamp in number of milliseconds since the Unix Epoch. [in]
`end_msec` : | . ending timestamp in number of milliseconds since the Unix Epoch. [in]
Returns : | a newly allocated ZeitgeistTimeRange. Free with `g_object_unref()`

### zeitgeist_time_range_new_anytime ()

    ZeitgeistTimeRange * zeitgeist_time_range_new_anytime   (void);

Returns : | a new time range starting from the beginning of the Unix Epoch stretching to the end of time

### zeitgeist_time_range_new_to_now ()

    ZeitgeistTimeRange * zeitgeist_time_range_new_to_now    (void);

Returns : | a new time range starting from the beggining of the Unix Epoch ending a the moment of invocation

### zeitgeist_time_range_new_from_now ()

    ZeitgeistTimeRange * zeitgeist_time_range_new_from_now  (void);

Returns : | a new time range starting from the moment of invocation to the end of time

### zeitgeist_time_range_new_from_variant ()

    ZeitgeistTimeRange * zeitgeist_time_range_new_from_variant
                                                            (GVariant *variant,
                                                             GError **error);

Create a TimeRange from a variant.

`variant` : | . a variant representing a TimeRange. [in]
`error` : | location to store the error occuring, or `NULL` to ignore. [error-domains ZeitgeistDataModelError]
Returns : | a new time range starting from the moment of invocation to the end of time

### zeitgeist_time_range_get_start ()

    gint64              zeitgeist_time_range_get_start      (ZeitgeistTimeRange *self);

Get and return the current value of the "start" property.

`self` : | the ZeitgeistTimeRange instance to query
Returns : | the value of the "start" property

### zeitgeist_time_range_get_end ()

    gint64              zeitgeist_time_range_get_end        (ZeitgeistTimeRange *self);

Get and return the current value of the "end" property.

`self` : | the ZeitgeistTimeRange instance to query
Returns : | the value of the "end" property

### struct ZeitgeistTimeRange

    struct ZeitgeistTimeRange;

Immutable representation of an interval in time, marked by a beginning and an end

A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.

### struct ZeitgeistTimeRangeClass

    struct ZeitgeistTimeRangeClass {
    	GObjectClass parent_class;
    };

The class structure for `ZEITGEIST_TYPE_TIME_RANGE`. All the fields in this structure are private and should never be accessed directly.

GObjectClass `parent_class`; | the parent class structure

## Property Details

### The `"end"` property

      "end"                      gint64                : Read

end.

Default value: 0

### The `"start"` property

      "start"                    gint64                : Read

start.

Default value: 0