diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-11-23 22:12:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-11-23 22:12:59 +0100 |
commit | bbb8486e1709ee297a1eb803f88041e1da1fa436 (patch) | |
tree | da5ce1c3b777c1766b3b5ef8e36fd9fbb0295e7f /src | |
parent | 9a98c7a156709ae16f7e043f866ecb452ce906f8 (diff) |
util: rename format_timestamp_pretty() to format_timestamp_relative() because that describes much better what it does
Diffstat (limited to 'src')
-rw-r--r-- | src/login/loginctl.c | 4 | ||||
-rw-r--r-- | src/shared/time-util.c | 2 | ||||
-rw-r--r-- | src/shared/time-util.h | 2 | ||||
-rw-r--r-- | src/systemctl/systemctl.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c index 146986b46e..820fcc05b5 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -334,7 +334,7 @@ static void print_session_status_info(SessionStatusInfo *i) { else printf("%u\n", (unsigned) i->uid); - s1 = format_timestamp_pretty(since1, sizeof(since1), i->timestamp); + s1 = format_timestamp_relative(since1, sizeof(since1), i->timestamp); s2 = format_timestamp(since2, sizeof(since2), i->timestamp); if (s1) @@ -427,7 +427,7 @@ static void print_user_status_info(UserStatusInfo *i) { else printf("%u\n", (unsigned) i->uid); - s1 = format_timestamp_pretty(since1, sizeof(since1), i->timestamp); + s1 = format_timestamp_relative(since1, sizeof(since1), i->timestamp); s2 = format_timestamp(since2, sizeof(since2), i->timestamp); if (s1) diff --git a/src/shared/time-util.c b/src/shared/time-util.c index 3323683339..3d00b20eec 100644 --- a/src/shared/time-util.c +++ b/src/shared/time-util.c @@ -142,7 +142,7 @@ char *format_timestamp(char *buf, size_t l, usec_t t) { return buf; } -char *format_timestamp_pretty(char *buf, size_t l, usec_t t) { +char *format_timestamp_relative(char *buf, size_t l, usec_t t) { usec_t n, d; n = now(CLOCK_REALTIME); diff --git a/src/shared/time-util.h b/src/shared/time-util.h index 6b69940eb5..1f6952cc5c 100644 --- a/src/shared/time-util.h +++ b/src/shared/time-util.h @@ -71,7 +71,7 @@ usec_t timeval_load(const struct timeval *tv); struct timeval *timeval_store(struct timeval *tv, usec_t u); char *format_timestamp(char *buf, size_t l, usec_t t); -char *format_timestamp_pretty(char *buf, size_t l, usec_t t); +char *format_timestamp_relative(char *buf, size_t l, usec_t t); char *format_timespan(char *buf, size_t l, usec_t t); void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t); diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index a605ed91b0..ba4f171fda 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2125,7 +2125,7 @@ static void print_status_info(UnitStatusInfo *i) { streq_ptr(i->active_state, "activating") ? i->inactive_exit_timestamp : i->active_exit_timestamp; - s1 = format_timestamp_pretty(since1, sizeof(since1), timestamp); + s1 = format_timestamp_relative(since1, sizeof(since1), timestamp); s2 = format_timestamp(since2, sizeof(since2), timestamp); if (s1) @@ -2136,7 +2136,7 @@ static void print_status_info(UnitStatusInfo *i) { printf("\n"); if (!i->condition_result && i->condition_timestamp > 0) { - s1 = format_timestamp_pretty(since1, sizeof(since1), i->condition_timestamp); + s1 = format_timestamp_relative(since1, sizeof(since1), i->condition_timestamp); s2 = format_timestamp(since2, sizeof(since2), i->condition_timestamp); if (s1) |