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:
14
examples/vwatch/cli_clock/main.v
Normal file
14
examples/vwatch/cli_clock/main.v
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user