Close the window when receiving a close request; turn time into int.
diff --git a/Demo/stdwin/clock.py b/Demo/stdwin/clock.py
index 0f7d6a9..975154a 100755
--- a/Demo/stdwin/clock.py
+++ b/Demo/stdwin/clock.py
@@ -68,6 +68,7 @@
 		setdimensions(win)
 	elif type == WE_CLOSE:
 		mainloop.unregister(win)
+		win.close()
 
 def setdimensions(win):
 	width, height = win.getwinsize()
@@ -198,6 +199,6 @@
 	return '0'*(2-len(s)) + s
 
 def getlocaltime():
-	return time.time() - TZDIFF
+	return int(time.time() - TZDIFF)
 
 main()