1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/examples/hot_reload/message.v

19 lines
341 B
V

module main
// Build this example with `v -live message.v`
import time
import 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_ms(500)
}
}