summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-17 14:14:29 -0400
committerPietro Gagliardi <[email protected]>2014-03-17 14:14:29 -0400
commite5425036e09dd5e1c929d55f245b384702639498 (patch)
tree6ce26ccabe84baabb166bcb5e1156b66f6737041
parentad2208d370704d9f7475ebe55ca790eea1a64063 (diff)
Put the Label that changed each second in the main test.
-rw-r--r--README.md2
-rw-r--r--test/main.go4
2 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8425868..cffc1b0 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ The issue:
- this fools Go's deadlock detector; it never reports anything
- changing from standard mutexes to R/W mutexes does not work
- making resizes concurrent causes resizes to become too slow to be acceptable (they trail behind the actual user resizing by a significant amount)
-If you know a better way I can do things, **please** help... I'm at my wits end here<br>`test/test -area` will run the Area test with the ticking label; I should probably add one to the main test so it can be tested on all platforms...
+If you know a better way I can do things, **please** help... I'm at my wits end here<br>The main test (`test/test`) now has its label show the current time; GTK+ users can run `test/test -area` for the Area test that sparked this whole calamity.
diff --git a/test/main.go b/test/main.go
index 6023991..f99ace1 100644
--- a/test/main.go
+++ b/test/main.go
@@ -243,9 +243,13 @@ func myMain() {
}
}
+ ticker := time.Tick(time.Second)
+
mainloop:
for {
select {
+ case curtime := <-ticker:
+ l.SetText(curtime.String())
case <-w.Closing:
break mainloop
case <-b.Clicked: