Skip to content

Commit 8477420

Browse files
committed
Replace deprecated functions with non-deprecated versions
1 parent 56b437f commit 8477420

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

C/Savina/src/BenchmarkRunner.lf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,29 +61,28 @@ reactor BenchmarkRunner(num_iterations:int(12)) {
6161
reaction(startup) -> nextIteration {=
6262
// Initialize an array of interval_t
6363
self->measuredTimes = (interval_t *) calloc(self->num_iterations, sizeof(interval_t));
64-
schedule(nextIteration, 0);
64+
lf_schedule(nextIteration, 0);
6565
=}
6666

6767

6868
reaction(nextIteration) -> start, done {=
6969
if (self->count < self->num_iterations) {
70-
self->startTime = get_physical_time();
71-
SET(start, true);
70+
self->startTime = lf_time_physical();
71+
lf_set(start, true);
7272
} else {
73-
schedule(done, 0);
73+
lf_schedule(done, 0);
7474
}
7575
=}
7676

7777
reaction(finish) -> nextIteration {=
78-
interval_t end_time = get_physical_time();
78+
interval_t end_time = lf_time_physical();
7979
interval_t duration = end_time - self->startTime;
8080
self->measuredTimes[self->count] = duration;
8181
self->count += 1;
8282

8383
printf("Iteration %d - %.3f ms\n", self->count, toMS(duration));
8484

85-
schedule(nextIteration, 0);
86-
85+
lf_schedule(nextIteration, 0);
8786
=}
8887

8988
reaction(done) {=
@@ -94,7 +93,7 @@ reactor BenchmarkRunner(num_iterations:int(12)) {
9493
printf("Best Time:\t %.3f msec\n", measuredMSTimes[0]);
9594
printf("Worst Time:\t %.3f msec\n", measuredMSTimes[self->num_iterations - 1]);
9695
printf("Median Time:\t %.3f msec\n", median(measuredMSTimes, self->num_iterations));
97-
request_stop();
96+
lf_request_stop();
9897
=}
9998

10099
preamble {=

0 commit comments

Comments
 (0)