Paste: clock_nanosleep

Author: ahmedammar
Mode: c
Date: Mon, 27 Jul 2009 10:29:17
Plain Text |
		clock_gettime(0,&t);
		t.tv_sec++;
		DDRB = 0xff;
		for(int i=0; i<10000; i++) 
		{
			DRB = val;
			int ret = clock_nanosleep(0, TIMER_ABSTIME, &t, NULL);
			val =! val;
			t.tv_nsec+= 100000;
                        tsnorm(&t); //normalizes time so that tv_nsec overflows into tv_sec
		}

New Annotation

Summary:
Author:
Mode:
Body: