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

tools, examples: add --only-watch=*.v option to v watch (#18974)

This commit is contained in:
Delyan Angelov
2023-07-27 09:50:26 +03:00
committed by GitHub
parent 7d6fd9dade
commit d25e213aa8
5 changed files with 172 additions and 22 deletions

View File

@ -0,0 +1,14 @@
import time
// This example demonstrates how to use `v watch` for simple CLI apps.
fn main() {
println('Run with: `v watch run examples/vwatch/cli_clock`,')
println('then modify timer.v in your editor.')
println('The application will be restarted,')
println('as soon as you save your changes.')
println('')
for {
println('The time is now: ${time.now()}')
time.sleep(1000 * time.millisecond)
}
}