summaryrefslogtreecommitdiffstats
path: root/main.c
blob: 5eae5eaab6c42dd5c530d7141d501bdb4aed3d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "project.h"



int main (int argc, char *argv[])
{
  EPOCH e;
  UTC u;
  struct timeval tv;
  uint8_t s[600];

  unsigned i;


  gettimeofday (&tv, NULL);

  e.s = tv.tv_sec;
  e.ns = tv.tv_usec * 1000;

  u = time_epoch_to_utc (e);


  time_print_utc ("Now:\n", u);

  {
    uint8_t a[60], b[60];
    msf_make_bits (u, a, b);

    msf_make_stream (s, a, b);
  }


  for (i = 0; i < 600; ++i) {
    putchar ('0' + s[i]);

    if ((i % 10) == 9) putchar (' ');
  }

  printf ("\n");



  return 0;

}