chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleaned up more unneeded functions and types in:
[elogind.git]
/
src
/
basic
/
time-util.c
diff --git
a/src/basic/time-util.c
b/src/basic/time-util.c
index 15185a2bb3e565222777e0e84a050c82cb00ca70..17d3da6fa296c5821300f2767907375f9dc201fb 100644
(file)
--- a/
src/basic/time-util.c
+++ b/
src/basic/time-util.c
@@
-37,6
+37,8
@@
usec_t now(clockid_t clock_id) {
return timespec_load(&ts);
}
return timespec_load(&ts);
}
+/// UNNEEDED by elogind
+#if 0
nsec_t now_nsec(clockid_t clock_id) {
struct timespec ts;
nsec_t now_nsec(clockid_t clock_id) {
struct timespec ts;
@@
-44,6
+46,7
@@
nsec_t now_nsec(clockid_t clock_id) {
return timespec_load_nsec(&ts);
}
return timespec_load_nsec(&ts);
}
+#endif // 0
dual_timestamp* dual_timestamp_get(dual_timestamp *ts) {
assert(ts);
dual_timestamp* dual_timestamp_get(dual_timestamp *ts) {
assert(ts);
@@
-98,7
+101,6
@@
dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u) {
return ts;
}
return ts;
}
-#endif // 0
dual_timestamp* dual_timestamp_from_boottime_or_monotonic(dual_timestamp *ts, usec_t u) {
int64_t delta;
dual_timestamp* dual_timestamp_from_boottime_or_monotonic(dual_timestamp *ts, usec_t u) {
int64_t delta;
@@
-124,7
+126,7
@@
dual_timestamp* dual_timestamp_from_boottime_or_monotonic(dual_timestamp *ts, us
return ts;
}
return ts;
}
-
+#endif // 0
usec_t timespec_load(const struct timespec *ts) {
assert(ts);
usec_t timespec_load(const struct timespec *ts) {
assert(ts);
@@
-798,6
+800,8
@@
int parse_sec(const char *t, usec_t *usec) {
return 0;
}
return 0;
}
+/// UNNEEDED by elogind
+#if 0
int parse_nsec(const char *t, nsec_t *nsec) {
static const struct {
const char *suffix;
int parse_nsec(const char *t, nsec_t *nsec) {
static const struct {
const char *suffix;
@@
-923,8
+927,6
@@
int parse_nsec(const char *t, nsec_t *nsec) {
return 0;
}
return 0;
}
-/// UNNEEDED by elogind
-#if 0
bool ntp_synced(void) {
struct timex txc = {};
bool ntp_synced(void) {
struct timex txc = {};
@@
-1041,7
+1043,6
@@
bool timezone_is_valid(const char *name) {
return true;
}
return true;
}
-#endif // 0
clockid_t clock_boottime_or_monotonic(void) {
static clockid_t clock = -1;
clockid_t clock_boottime_or_monotonic(void) {
static clockid_t clock = -1;
@@
-1087,3
+1088,4
@@
int get_timezone(char **tz) {
*tz = z;
return 0;
}
*tz = z;
return 0;
}
+#endif // 0