Use `Control_Type' to handle different segment directions.
[ttfautohint.git] / lib / tatime.c
blob8da0ffd5c45387f961fa7a402de27c2567332979
1 /* tatime.c */
3 /*
4 * Copyright (C) 2011-2014 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
16 #include <time.h>
17 #include <stdint.h>
19 #include "ta.h"
21 typedef uint64_t TA_ULongLong;
24 void
25 TA_get_current_time(FT_ULong* high,
26 FT_ULong* low)
28 /* there have been 24107 days between January 1st, 1904 (the epoch of */
29 /* OpenType), and January 1st, 1970 (the epoch of the `time' function) */
30 TA_ULongLong seconds_to_1970 = 24107 * 24 * 60 * 60;
31 TA_ULongLong seconds_to_today = seconds_to_1970 + time(NULL);
34 *high = (FT_ULong)(seconds_to_today >> 32);
35 *low = (FT_ULong)seconds_to_today;
38 /* end of tatime.c */