12345678910111213141516171819202122232425262728293031323334353637(* [Raw_scheduler] is distinct from [Scheduler], because the former exposes some things
that are used internally within Async that are not exposed in scheduler.mli.
Also, it breaks a cyclic dependency [Raw_scheduler -> Log -> Scheduler]. *)open!Coreopen!ImportincludeRaw_schedulerletcurrent_execution_context=Async_kernel_scheduler.current_execution_contextlettime_spent_waiting_for_io()=lett=t()int.time_spent_waiting_for_io|>Tsc.Span.to_ns~calibrator:(forceTime_stamp_counter.calibrator)|>Time_ns.Span.of_int63_ns;;letset_min_inter_cycle_timeoutmin_inter_cycle_timeout=lett=t()inifTime_ns.Span.(>)min_inter_cycle_timeout(t.max_inter_cycle_timeout:>Time_ns.Span.t)thenError.raise([%message"min_inter_cycle_timeout too large"(min_inter_cycle_timeout:Time_ns.Span.t)(t.max_inter_cycle_timeout:Max_inter_cycle_timeout.t)]|>[%of_sexp:Error.t]);t.min_inter_cycle_timeout<-Min_inter_cycle_timeout.create_exnmin_inter_cycle_timeout;;letmax_num_open_file_descrs()=max_num_open_file_descrs(t())letfds_may_produce_events()=fds_may_produce_events(t())letthread_pool_has_unfinished_work()=thread_pool_has_unfinished_work(t())letmax_num_threads()=max_num_threads(t())let_=current_execution_context