/*

    l_main.c

*/





#include <time.h>
#include <stdio.h>
#include <stdlib.h>

#include "l_main.h"

static clock_t starttime;
static clock_t lasttime;

void    l_init(void) {

    starttime=clock();
    lasttime=starttime;

    }

void    l_shutdown(void) {

    }

int     l_gettime(void) {
    return (int)((clock()-starttime)*(1000000/CLOCKS_PER_SEC));
    }

int     l_gettimedif(void) {
clock_t now;
int     dif;

    now=clock();
    dif=(int)(now-lasttime)*(1000000/CLOCKS_PER_SEC);
    lasttime=now;
    return dif;

    }