コード例 #1
0
ファイル: main.c プロジェクト: chrippa/xmms2
gint
main (gint argc, gchar **argv)
{
	cli_infos_t *cli_infos;

	setlocale (LC_ALL, "");

	cli_infos = cli_infos_init (argc - 1, argv + 1);

	/* Execute command, if connection status is ok */
	if (cli_infos) {
		if (cli_infos->mode == CLI_EXECUTION_MODE_INLINE) {
			loop_once (cli_infos, argc - 1, argv + 1);
		} else {
			gchar *filename;

			filename = configuration_get_string (cli_infos->config,
			                                     "HISTORY_FILE");

			read_history (filename);
			using_history ();
			loop_run (cli_infos);
			write_history (filename);
		}
	}

	cli_infos_free (cli_infos);

	return 0;
}
コード例 #2
0
ファイル: androidmain.cpp プロジェクト: netguy204/giggle
JNIEXPORT int JNICALL Java_com_fiftyply_mosaic_GameSurfaceView_nativeStep(JNIEnv* env, jobject obj) {
  //LOGI("nativeStep");
  if(!have_initialized) {
    renderer_enqueue_sync(renderer_init, NULL);
    game_init();
    have_initialized = 1;
  }

  return loop_once();
}
コード例 #3
0
ファイル: rtspin_hime.c プロジェクト: felipeqc/semi
static void configure_loop(void)
{
	double start;

	/* prime cache */
	loop_once();
	loop_once();
	loop_once();

	/* measure */
	start = wctime();
	loop_once(); /* hope we didn't get preempted  */
	loop_length = wctime();
	loop_length -= start;

	/* fine tune */
	fine_tune(0.1);
	fine_tune(0.1);
	fine_tune(0.1);
}
コード例 #4
0
ファイル: preempt.c プロジェクト: zs673/litmus_mrsp
static int loop_for(int id, double exec_time)
{
	double last_loop = 0, loop_start;
	int tmp = 0;

	double start = cputime();
	double now = cputime();

	while (now + last_loop < start + exec_time) {
		loop_start = now;
		tmp += loop_once();
		now = cputime();
		last_loop = now - loop_start;
	}

	return tmp;
}
コード例 #5
0
ファイル: rtspin_hime.c プロジェクト: felipeqc/semi
static int loop_for(double exec_time)
{
	double t = 0;
	int tmp = 0;
/*	while (t + loop_length < exec_time) {
		tmp += loop_once();
		t += loop_length;
	}
*/
	double start = cputime();
	double now = cputime();
	while (now + loop_length < start + exec_time) {
		tmp += loop_once();
		t += loop_length;
		now = cputime();
	}

	return tmp;
}
コード例 #6
0
ファイル: main.c プロジェクト: Reilithion/xmms2-reilithion
gint
main (gint argc, gchar **argv)
{
	cli_infos_t *cli_infos;

	cli_infos = cli_infos_init (argc - 1, argv + 1);

	/* Execute command, if connection status is ok */
	if (cli_infos) {
		if (cli_infos->mode == CLI_EXECUTION_MODE_INLINE) {
			loop_once (cli_infos, argc - 1, argv + 1);
		} else {
			loop_run (cli_infos);
		}
	}

	cli_infos_free (cli_infos);

	return 0;
}
コード例 #7
0
ファイル: event_base.cpp プロジェクト: hehechen/netlib
void EventsImp::loop() {
    while (!exit_)
        loop_once(10000);

    loop_once(0);
}