summaryrefslogtreecommitdiff
path: root/src/journal/journalctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r--src/journal/journalctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index bb1f18a21f..a6b6e0fbd6 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -50,6 +50,7 @@ int main(int argc, char *argv[]) {
const void *data;
size_t length;
char *cursor;
+ uint64_t realtime = 0, monotonic = 0;
r = sd_journal_get_cursor(j, &cursor);
if (r < 0) {
@@ -60,6 +61,13 @@ int main(int argc, char *argv[]) {
printf("entry: %s\n", cursor);
free(cursor);
+ sd_journal_get_realtime_usec(j, &realtime);
+ sd_journal_get_monotonic_usec(j, &monotonic);
+ printf("realtime: %llu\n"
+ "monotonic: %llu\n",
+ (unsigned long long) realtime,
+ (unsigned long long) monotonic);
+
SD_JOURNAL_FOREACH_FIELD(j, data, length)
printf("\t%.*s\n", (int) length, (const char*) data);
}