From b456752858e7ee9ad9343fe011a56cac019df2e4 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 15 Oct 2025 13:04:10 +0300 Subject: [PATCH] v.preludes: cleanup profiled_program.v --- vlib/v/preludes/profiled_program.v | 7 +------ vlib/v/preludes_js/profiled_program.v | 3 +++ vlib/v/profile/api.v | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 vlib/v/preludes_js/profiled_program.v diff --git a/vlib/v/preludes/profiled_program.v b/vlib/v/preludes/profiled_program.v index ccf2bf4df..384d7ad8b 100644 --- a/vlib/v/preludes/profiled_program.v +++ b/vlib/v/preludes/profiled_program.v @@ -1,8 +1,3 @@ module main -import time -import v.profile - -const profiled_program_time_used = time.seconds_per_minute - -const profiled_program_profile_used = profile.state() +import v.profile as _ diff --git a/vlib/v/preludes_js/profiled_program.v b/vlib/v/preludes_js/profiled_program.v new file mode 100644 index 000000000..384d7ad8b --- /dev/null +++ b/vlib/v/preludes_js/profiled_program.v @@ -0,0 +1,3 @@ +module main + +import v.profile as _ diff --git a/vlib/v/profile/api.v b/vlib/v/profile/api.v index e943cb6ef..dd60bbe59 100644 --- a/vlib/v/profile/api.v +++ b/vlib/v/profile/api.v @@ -1,6 +1,8 @@ @[has_globals] module profile +import time as _ + __global v__profile_enabled = true pub fn state() bool { -- 2.39.5