Following the idea of

9beb9bbaae
make the simulator timing more accurate.
This commit is contained in:
Stefan `Sec` Zehl 2012-01-03 00:05:44 +01:00
parent 3e22f2b652
commit 60da28cddd
1 changed files with 16 additions and 2 deletions

View File

@ -1,2 +1,16 @@
/* AUTOGENERATED SOURCE FILE */
#include "../../../firmware/basic/delayms.c"
#include <sysdefs.h>
#include "lpc134x.h"
/* Simulator improved version */
#define _POSIX_C_SOURCE 199309
#include <time.h>
void delayms(uint32_t ms)
{
struct timespec t;
t.tv_sec = ms / 1000;
t.tv_nsec = (ms % 1000) * 1000000;
nanosleep (&t, NULL);
}