/* ------ main1.c: scheduling in Prosim ------ */ #include #include #include void Proc1() { while (1) { Hold(1.2); printf("Proc1: Now = %lf\n", Now); } } void Proc2() { while (1) { Hold(1.5); printf("Proc2: Now = %lf\n", Now); } } int main(int argc, char **argv) { printf("Init Prosim\n"); InitProsim(1000, 1000, 1000); printf("Generate Proc1:\n"); Generate("Name:Proc1", Proc1, 0); printf("Generate Proc2:\n"); Generate("Name:Proc2", Proc2, 0); StartSimulate(10); printf("DONE !\n"); }