diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-05-01 14:07:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-01 09:42:31 -0700 |
commit | 9c70261c0e294d46d62d99725a1ae9ddc01eb1cf (patch) | |
tree | a1ae27fd5a27700f8b272b0faad8a5d2bc2910b0 /core/subsurface-time.h | |
parent | 50b195142b07e58a1c0e3bfe5c725bf5e3dd4020 (diff) | |
download | subsurface-9c70261c0e294d46d62d99725a1ae9ddc01eb1cf.tar.gz |
cleanup: move declaration of utc_mk* functions to new subsurface-time.h header
No point in slurping in all of dive.h for translation units that only
want to do some time manipulation without ever touching a dive.
Don't call the header "time.h", because we don't want to end up in a
confusion with the system header of the same name.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/subsurface-time.h')
-rw-r--r-- | core/subsurface-time.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/subsurface-time.h b/core/subsurface-time.h new file mode 100644 index 000000000..38d6c10de --- /dev/null +++ b/core/subsurface-time.h @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef TIME_H +#define TIME_H + +#include "units.h" +#include <time.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern timestamp_t utc_mktime(struct tm *tm); +extern void utc_mkdate(timestamp_t, struct tm *tm); + +#ifdef __cplusplus +} +#endif + +#endif |