diff options
Diffstat (limited to 'src/target/openrisc')
-rw-r--r-- | src/target/openrisc/or1k.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/target/openrisc/or1k.c b/src/target/openrisc/or1k.c index 3895ddf..bcb648c 100644 --- a/src/target/openrisc/or1k.c +++ b/src/target/openrisc/or1k.c @@ -1248,8 +1248,7 @@ static int or1k_profiling(struct target *target, uint32_t *samples, samples[sample_count++] = reg_value; gettimeofday(&now, NULL); - if ((sample_count >= max_num_samples) || - ((now.tv_sec >= timeout.tv_sec) && (now.tv_usec >= timeout.tv_usec))) { + if ((sample_count >= max_num_samples) || timeval_compare(&now, &timeout) > 0) { LOG_INFO("Profiling completed. %" PRIu32 " samples.", sample_count); break; } |