mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: deprecate short struct init (#10842)
This commit is contained in:
@ -32,7 +32,7 @@ fn main() {
|
||||
nrec := os.args[2].int()
|
||||
buflen := os.args[3].int()
|
||||
nobj := os.args[4].int()
|
||||
stopwatch := time.new_stopwatch({})
|
||||
stopwatch := time.new_stopwatch()
|
||||
ch := chan int{cap: buflen}
|
||||
resch := chan i64{}
|
||||
mut no := nobj
|
||||
|
@ -36,7 +36,7 @@ mut:
|
||||
|
||||
fn do_rec(ch chan int, id int, mut ctx Context) {
|
||||
eprintln('start of do_rec id: $id')
|
||||
mut timer_sw_x := time.new_stopwatch({})
|
||||
mut timer_sw_x := time.new_stopwatch()
|
||||
mut tmp := int(0)
|
||||
mut i := int(0)
|
||||
// NB: a single receiver thread can get slightly more
|
||||
@ -69,7 +69,7 @@ fn do_rec(ch chan int, id int, mut ctx Context) {
|
||||
|
||||
fn do_send(ch chan int, id int, mut ctx Context) {
|
||||
eprintln('start of do_send id: $id')
|
||||
mut timer_sw_x := time.new_stopwatch({})
|
||||
mut timer_sw_x := time.new_stopwatch()
|
||||
n_iters := ctx.n_iters
|
||||
base := n_iters * id // sender events can not overlap
|
||||
for i := 0; i < n_iters; i++ {
|
||||
|
@ -86,7 +86,7 @@ fn test_select_blocks() {
|
||||
a: 13
|
||||
}
|
||||
sem.wait()
|
||||
stopwatch := time.new_stopwatch({})
|
||||
stopwatch := time.new_stopwatch()
|
||||
go f1(ch1, ch2, ch3, ch4, ch5, mut sem)
|
||||
sem.wait()
|
||||
elapsed_ms := f64(stopwatch.elapsed()) / time.millisecond
|
||||
|
@ -648,7 +648,7 @@ pub fn channel_select(mut channels []&Channel, dir []Direction, mut objrefs []vo
|
||||
stopwatch := if timeout == time.infinite || timeout <= 0 {
|
||||
time.StopWatch{}
|
||||
} else {
|
||||
time.new_stopwatch({})
|
||||
time.new_stopwatch()
|
||||
}
|
||||
mut event_idx := -1 // negative index means `timed out`
|
||||
|
||||
|
Reference in New Issue
Block a user