File: usleep.c

package info (click to toggle)
minicom 2.6.1-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,496 kB
  • sloc: ansic: 14,167; sh: 4,522; makefile: 125
file content (17 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include <sys/time.h>
#include <sys/select.h>

int usleep(unsigned usecs)
{
	struct timeval t;

	t.tv_sec  = usecs/1000000;
	t.tv_usec = usecs%1000000;
	select(1, NULL, NULL, NULL, &t);
	return 0;
}