예제 #1
0
/*! Initialize time management subsystem */
void k_time_init ()
{
	/* alarm list is empty */
	list_init ( &kalarms );

	arch_timer_init ();

	arch_get_min_interval ( &threshold );

	threshold.nsec /= 2;
	if ( threshold.sec % 2 )
		threshold.nsec += 1000000000L / 2; /* + half second */
	threshold.sec /= 2;
}
예제 #2
0
파일: time.c 프로젝트: bkolobara/Benu-pi
/*! Initialize time management subsystem */
int k_time_init ()
{
	arch_timer_init ();

	/* timer list is empty */
	list_init ( &ktimers );

	arch_get_min_interval ( &threshold );
	threshold.tv_nsec /= 2;
	if ( threshold.tv_sec % 2 )
		threshold.tv_nsec += 500000000L; /* + half second */
	threshold.tv_sec /= 2;

	return EXIT_SUCCESS;
}