473,396 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Change time to start clock from

Please help me out all you code junkies on here. Im in a web design course and im trying to get a piece of javascript that will allow me to change the time that it want it to start from. Kind of like a clock on each page but i dont want it to be real time i want it to start at a certain different time on each page. All the scripts i can find only let me use the current live time and i want to be able to use random times to start the clock with. Any help would be amazing!
Apr 3 '07 #1
4 1791
KevinADC
4,059 Expert 2GB
Community Cafe (General Non-technical)

I guess you missed that. ;)
Apr 3 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
This question is being moved to the Javascript forum.

ADMIN
Apr 3 '07 #3
acoder
16,027 Expert Mod 8TB
Changed thread title.
Apr 4 '07 #4
acoder
16,027 Expert Mod 8TB
Please help me out all you code junkies on here. Im in a web design course and im trying to get a piece of javascript that will allow me to change the time that it want it to start from. Kind of like a clock on each page but i dont want it to be real time i want it to start at a certain different time on each page. All the scripts i can find only let me use the current live time and i want to be able to use random times to start the clock with. Any help would be amazing!
Welcome to The Scripts.

"new Date()" will give you the current date and time. Then use the getHours(), getMinutes() and getSeconds() methods and add random numbers to them (or however you want to change them) and then display. See here for the Date object reference.
Apr 4 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dr John Stockton | last post by:
It looks as if the USA may be changing its Summer Time (DST) Rules, perhaps with immediate effect. Browsers use the rules selected in the OS, and I predict that in many cases the rules will not...
5
by: Robert | last post by:
Hello all, I use clock() to measure the time cost in my program. But the t_clock always be the multiply of 10, for example 10, 20, 30, 40,... And I want to get the precision of 1, such as 11,...
11
by: srkkreddy | last post by:
Hi, I have written a large program which makes multiple calls to number of functions (also written by me) of the program. Now, I want to know the collective time taken by all the calls to a...
6
by: Charles M. Reinke | last post by:
I'm using the function clock() to measure the run time of a program so that I can compare among several different algorithms. My code looks like: #include <stdio.h> #include <stdlib.h>...
9
by: HL | last post by:
I am using VS 2005 Beta - C# Problem: The Timer fires a few milliseconds before the actual Due-Time Let's say a timer is created in the following manner: System.Threading.Timer m_timer = null;...
41
by: Petr Jakes | last post by:
Hello, I am trying to study/understand OOP principles using Python. I have found following code http://tinyurl.com/a4zkn about FSM (finite state machine) on this list, which looks quite useful for...
17
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. ...
19
by: xianwei | last post by:
#include <stdio.h> #include <stdlib.h> #include <time.h> int main ( int argc, char *argv ) { long i = 10000000L; clock_t start, end; double duration;
8
by: Theo v. Werkhoven | last post by:
hi, In this code I read out an instrument during a user determined period, and save the relative time of the sample (since the start of the test) and the readback value in a csv file. #v+...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.