#include <stdint.h>
#include <stddef.h>
#include <ulib.h>

#define CMDS(X)                     \
  X(now)

void main(void) {
  if (argslen() == 0) {
    return;
  }

  char *cmd = args()[0];

  #define X(name) if (string_strcmp(cmd, #name) == 0) { \
    extern void tm_ ## name(void); \
    tm_ ## name(); \
    return; \
  }
  CMDS(X)
  #undef X

  uprintf("time: unknown command %s\n", cmd);
}
