Search the Community
Showing results for tags 'timestamp'.
Hello, I am trying to do something similar to what is used in browser MMOs. CREATE TABLE Processes ( Name varchar(255) NOT NULL UNIQUE, StartTime TIMESTAMP, DurationTime TIMESTAMP, EndTime TIMESTAMP, CurrentTime TIMESTAMP, IsFinished int, PRIMARY KEY (Name) ); Specifically: I have a process, that has a StartTime and DurationTime. IsFinished starts as 0. I need: 1) When I do INSERT: Calculate the end time, the result is put into EndTime field 2) When I want to update (for now manually, not with timer): Compare CurrentTime (should be taken automatically) to EndTime. If CurrentTime is past, IsFinished turns to '1' How it can be achieved? I have some basic knowledge, but not how to add or compare timestamps. Thank you in advance, Evgenie
Hello & Thanks , From topic : http://w3schools.invisionzone.com/index.php?showtopic=55453#entry304554 I have lots of questions about requestAnimationFrame So I decided to make this question a separate issue : The code size is trimmed way down from the actual running game , to make it easy to follow . Here is the updated function to start and stop animation : How come the 'stop' function doesn't work ? And here is the game loop : Also : Here are my ?s : How come the 'stop' function doesn't work ? Why is it so slow ? I have tried several speeds , but always , soooo slow . And this really puzzles me : I can increase the speed by simply clicking the 'start' button repeatedly . Though , I suppose I could add another 'start' button and call it 'Increase Speed' button I would rather use the methods (timestamp & performance.now) here : and here : But I can't piece it all together , to make it work . I would like some help with this also . Thanks