src/timestamp.h
author Krista Grothoff <krista@pep-project.org>
Sat, 24 Sep 2016 18:09:18 +0200
branchENGINE-27
changeset 1185 4b01328f3cf2
parent 124 e2930c783d3c
child 1513 e7f7e42385b5
permissions -rw-r--r--
ENGINE-27: update_identity no longer pays attention to the input identity's fpr, but pulls one from elect_pubkey.
     1 #pragma once
     2 
     3 #include <time.h>
     4 #include "dynamic_api.h"
     5 
     6 #ifdef __cplusplus
     7 extern "C" {
     8 #endif
     9 
    10 
    11 // for time values all functions are using POSIX struct tm
    12 
    13 typedef struct tm timestamp;
    14 
    15 
    16 // new_timestamp() - allocate a new timestamp
    17 //
    18 //  parameters:
    19 //      clock (in)      initial value or 0 if not available
    20 //
    21 //  return value:
    22 //      pointer to timestamp object or NULL if out of memory
    23 
    24 DYNAMIC_API timestamp * new_timestamp(time_t clock);
    25 
    26 
    27 // free_timestamp() - free memory occupied by timestamp
    28 //
    29 //  parameters:
    30 //      ts (in)         pointer to timestamp to free
    31 
    32 DYNAMIC_API void free_timestamp(timestamp *ts);
    33 
    34 
    35 // timestamp_dup() - duplicate a timestamp
    36 //
    37 //  parameters:
    38 //      src (in)        pointer to timestamp to duplicate
    39 //
    40 //  return value:
    41 //      pointer to copy or NULL if out of memory
    42 
    43 DYNAMIC_API timestamp * timestamp_dup(const timestamp *src);
    44 
    45 
    46 #ifdef __cplusplus
    47 }
    48 #endif
    49