1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 
3 #include "analyze.h"
4 #include "analyze-time.h"
5 #include "analyze-time-data.h"
6 
verb_time(int argc,char * argv[],void * userdata)7 int verb_time(int argc, char *argv[], void *userdata) {
8         _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
9         _cleanup_free_ char *buf = NULL;
10         int r;
11 
12         r = acquire_bus(&bus, NULL);
13         if (r < 0)
14                 return bus_log_connect_error(r, arg_transport);
15 
16         r = pretty_boot_time(bus, &buf);
17         if (r < 0)
18                 return r;
19 
20         puts(buf);
21         return 0;
22 }
23