1 // SPDX-License-Identifier: GPL-2.0-or-later
3 /***************************************************************************
4 * Copyright (C) 2010 by Øyvind Harboe *
5 ***************************************************************************/
7 /* this file contains various functionality useful to standalone systems */
14 #include "time_support.h"
17 COMMAND_HANDLER(handler_util_ms
)
20 return ERROR_COMMAND_SYNTAX_ERROR
;
22 command_print(CMD
, "%" PRId64
, timeval_ms());
27 static const struct command_registration util_command_handlers
[] = {
31 .handler
= handler_util_ms
,
33 "Returns ever increasing milliseconds. Used to calculate differences in time.",
36 COMMAND_REGISTRATION_DONE
39 int util_init(struct command_context
*cmd_ctx
)
41 return register_commands(cmd_ctx
, NULL
, util_command_handlers
);