From bf2c624c9bb73f1f0e634e618d63de359ec9ef2a Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 29 Dec 2012 22:57:02 +0100 Subject: [PATCH] Add struct timespec. --- libc/include/time.h | 4 ++++ sortix/include/sortix/timespec.h | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 sortix/include/sortix/timespec.h diff --git a/libc/include/time.h b/libc/include/time.h index c8ebb785..f41fa972 100644 --- a/libc/include/time.h +++ b/libc/include/time.h @@ -35,6 +35,10 @@ __BEGIN_DECLS @include(time_t.h) @include(NULL.h) +__END_DECLS +#include +__BEGIN_DECLS + #define CLOCKS_PER_SEC 1000000 struct tm diff --git a/sortix/include/sortix/timespec.h b/sortix/include/sortix/timespec.h new file mode 100644 index 00000000..4a25bc8e --- /dev/null +++ b/sortix/include/sortix/timespec.h @@ -0,0 +1,40 @@ +/******************************************************************************* + + Copyright(C) Jonas 'Sortie' Termansen 2012. + + This file is part of Sortix. + + Sortix is free software: you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any later + version. + + Sortix is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + Sortix. If not, see . + + sortix/timespec.h + Declaration of the timespec structure. + +*******************************************************************************/ + +#ifndef INCLUDE_SORTIX_TIMESPEC_H +#define INCLUDE_SORTIX_TIMESPEC_H + +#include + +__BEGIN_DECLS + +struct timespec +{ + time_t tv_sec; + long tv_nsec; +}; + +__END_DECLS + +#endif