Hai,
I write a simulation and need to set the time for running the simulation. the simulation should stop based on the time that heve been set .How to set start time, get the current time and lastly to get the total time of java running program? really hope u can help me asap :)
eena75 0 Newbie Poster
Recommended Answers
Jump to Post1) we don't do your homework for you, show some effort
2) we're certainly not going to let you order us around to do it "asap". If and when we do anything it'll be at a time and place of our choosing, not yours, suggesting anything else makes us LESS …
Jump to PostWell the basic way of getting time in a program is to use
long x = System.getCurrentTime();
which returns the current time of the computer in milliseconds.
Anyone with a brain could figure it out from there! :p
there is no such method in my Java API
perhaps you …
All 8 Replies
thekashyap 193 Practically a Posting Shark
jwenting 1,905 duckman Team Colleague
babyfrostie 0 Light Poster
mickinator 0 Junior Poster in Training
babyfrostie 0 Light Poster
mickinator 0 Junior Poster in Training
bugmenot 25 Posting Whiz in Training
mickinator 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.