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