Artifact
11a257d216d22d8472734d6718e0432a27f7f996:
Ticket change
[11a257d216]
- New ticket
[1805794fffffffff|1805794fff] <i>changing unix system time</i>.
by
kitchen on
2007-10-01 16:54:21.
D 2007-10-01T16:54:21
J assignee kennykb
J cmimetype text/plain
J comment TCL\sis\sunable\sto\sdeal\swith\sUnix\stime\sbeing\sreset\sto\sa\nvalue\sless\sthan\sthe\scurrent\stime.\s\sIt\scauses\stimers\sto\nstop\sworking\suntil\sthe\stime\s"catches\sup"\sto\swhere\sit\swas\noriginally\sset.\n\nFor\sexample\sif\sI\sset\sthe\ssystem\stime\sbackwards\sby\s100\nseconds\sand\sI\shave\sprogrammed\sthe\ssystem\sfor\sa\s100mS\ntimer\sI\swill\snot\sreceive\sa\stimer\sevent\sfor\s100\sseconds.\n\nIn\smy\scase\sI\shappen\sto\sbe\sdoing\sthis\sfrom\sthe\sC\slanguage\ninterface\susing\sTcl_CreateTimerHandler()\showever\sI'm\ssure\nthis\saffects\sall\saspects\sof\stimer\soperation\sunder\sTCL.\n\nSetting\sthe\ssystem\stime\sforward\sis\sless\sof\sa\sproblem.\nIt\ssimply\scauses\sthe\stimers\sto\simmediately\swake\sup\s--\nassuming\sthat\sthe\stime\shas\sbeen\sset\sforward\sfar\senough.\n\nI\srealize\sthis\smay\sbe\sdifficult\sto\ssolve.\sselect()\ndoesn't\shave\sa\sproblem\swith\sit.\s\sI\ssuspect\sthat\sselect()\nmust\suse\sthe\skernel\sjiffy\scounter\srather\sthan\slooking\sat\nthe\ssystem\stime.\n\nA\strick\sI've\sused\selsewhere\sin\smy\scode\sis\sto\slook\sat\sthe\nsystem\stime\swhen\sselect()\swakes\sup\sand\scompare\sit\sto\sthe\nprevious\spass\sand\sif\sthe\sdifference\sis\sseveral\stimes\nlarger\sthan\sthe\sselect()\ssleep\stime\sassume\sthe\sclock\shas\nbeen\sreset\sand\sadjust\sthings\sin\sthe\sprogram\saccordingly.\n\n\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter kitchen
J subsystem 03.\sTimer\sEvents
J title changing\sunix\ssystem\stime
J type Bug
K 1805794fffffffffffffffffffffffffffffffff
U kitchen
Z 3b3ee29dde721f0fc1eaf8bc5f3208f1