Following the idea of
9beb9bbaae
make the simulator timing more accurate.
This commit is contained in:
parent
3e22f2b652
commit
60da28cddd
|
@ -1,2 +1,16 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
#include <sysdefs.h>
|
||||||
#include "../../../firmware/basic/delayms.c"
|
#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);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue