OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Partial <time.h>-lookalike-ish. Note that this is a C header, so that crappy | |
6 // (and non-crappy) C programs can use it. | |
7 // | |
8 // In general, functions/types/macros are given "mojio_"/"MOJIO_"/etc. prefixes. | |
9 // There are a handful of exceptions (noted below). | |
10 // | |
11 // Ordinarily, we'd just use |time_t| from <time.h> (since that's provided by | |
12 // the C standard), but |time_t| is opaque. Thus we need to define our own | |
13 // equivalent. On top of that, we need to define a |struct timespec| equivalent. | |
14 | |
15 #ifndef MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_TIME_H_ | |
16 #define MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_TIME_H_ | |
17 | |
18 // Includes -------------------------------------------------------------------- | |
19 | |
20 #include "files/public/c/mojio_config.h" | |
21 | |
22 // Types ----------------------------------------------------------------------- | |
23 | |
24 typedef mojio_config_int64 mojio_time_t; | |
25 | |
26 struct mojio_timespec { | |
27 mojio_time_t tv_sec; | |
28 long tv_nsec; | |
29 }; | |
30 | |
31 #endif // MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_TIME_H_ | |
OLD | NEW |