v2 / examples / vwatch / cli_clock / main.v
14 lines · 13 sloc · 407 bytes · d25e213aa8327b21d49ed6b3f4f5a6e714a7ff8a
Raw
1import time
2// This example demonstrates how to use `v watch` for simple CLI apps.
3
4fn main() {
5 println('Run with: `v watch run examples/vwatch/cli_clock`,')
6 println('then modify timer.v in your editor.')
7 println('The application will be restarted,')
8 println('as soon as you save your changes.')
9 println('')
10 for {
11 println('The time is now: ${time.now()}')
12 time.sleep(1000 * time.millisecond)
13 }
14}
15