Skip to content

Commit

Permalink
Drop dead code from cputime tracking
Browse files Browse the repository at this point in the history
This was left over from a previous implementation.
  • Loading branch information
Fayti1703 committed Oct 9, 2024
1 parent 63da862 commit 7d74231
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions ext/mini_racer_extension/mini_racer_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ typedef struct {
Persistent<Context>* context;
Global<Object> ruby_error_prototype;
Global<Function> capture_stack_trace;
std::atomic<unsigned long> cpu_nanos;
struct timespec cpu_time_reference;
} ContextInfo;

typedef struct {
Expand Down Expand Up @@ -508,10 +506,6 @@ nogvl_context_eval(void* arg) {
StackCounter::SetMax(isolate, eval_params->marshal_stackdepth);
}

int time_status = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &eval_params->context_info->cpu_time_reference);
assert(time_status == 0); // can only hit on EOVERFLOW (which shouldn't happen) and EINVAL (kernel too old; don't care right now)
eval_params->context_info->cpu_nanos.store(0L, std::memory_order_relaxed);

maybe_value = parsed_script.ToLocalChecked()->Run(context);
}

Expand Down

0 comments on commit 7d74231

Please sign in to comment.