aboutsummaryrefslogtreecommitdiffstats
path: root/csrc/smith.c
blob: 3643abd3fc47a37cb34ddcd274b1e420ae52b3d1 (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
/*********************************/
/*   SMITH            (  //      */
/*   smith             ( )/      */
/*   by salade         )(/       */
/*  ________________  ( /)       */
/* ()__)____________)))))   :^}  */
/*********************************/

#include "smith.h"
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>

char *
mr_smith()
{
    return ("---SMITH_V0.0.0---");
}

char*
get_timestamp()
{
    struct timeval tv;
    long ct;
    char * buffer;

    buffer = (char*)malloc(30);
    gettimeofday(&tv, NULL);
    ct = ((tv.tv_sec * 1000) + (tv.tv_usec / 1000));
    sprintf(buffer, "%ld", ct);
    return buffer;
}