mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: do not allow calling private functions
This commit is contained in:
@@ -29,7 +29,7 @@ struct C.timespec {
|
||||
// the first arg is defined in include/bits/types.h as `__S32_TYPE`, which is `int`
|
||||
fn C.clock_gettime(int, &C.timespec)
|
||||
|
||||
fn sys_mono_now() u64 {
|
||||
pub fn sys_mono_now() u64 {
|
||||
$if macos {
|
||||
return sys_mono_now_darwin()
|
||||
} $else {
|
||||
|
||||
@@ -41,7 +41,7 @@ fn init_win_time_start() u64 {
|
||||
return s
|
||||
}
|
||||
|
||||
fn sys_mono_now() u64 {
|
||||
pub fn sys_mono_now() u64 {
|
||||
tm := u64(0)
|
||||
C.QueryPerformanceCounter(&tm) // XP or later never fail
|
||||
return (tm - start_time) * 1_000_000_000 / freq_time
|
||||
|
||||
Reference in New Issue
Block a user