aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/examples/hot_reload/message.v
blob: 1f9ec2a320581193a08072540dbea2652ece49a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module main

// Build this example with `v -live message.v`
import time
import v.live

[live]
fn print_message() {
	info := live.info()
	println('OK reloads: ${info.reloads_ok:4d} | Total reloads: ${info.reloads:4d} | Hello! Modify this message while the program is running.')
}

fn main() {
	for {
		print_message()
		time.sleep(500 * time.millisecond)
	}
}