how long does it take
-
But unless the loop writes something then how do you know the computer is counting...it could be skipping the loop altogether and laughing at you behind your back.
Gary Kirkham Forever Forgiven and Alive in the Spirit The fool has said in his heart, "There is no God" Me blog, You read
Gary Kirkham wrote:
it could be skipping the loop altogether and laughing at you behind your back.
hehehehe anyway it is runing for more than 1 hour so far what i got is 154500000
-
But unless the loop writes something then how do you know the computer is counting...it could be skipping the loop altogether and laughing at you behind your back.
Gary Kirkham Forever Forgiven and Alive in the Spirit The fool has said in his heart, "There is no God" Me blog, You read
-
how long does it take for a computer to count from 0 to the maximum value of int ??
If a program encounters a loop in a forest, does the computer actually execute it? Marc
-
how long does it take for a computer to count from 0 to the maximum value of int ??
Release, Debug or Plain English?
Deja View - the feeling that you've seen this post before.
-
Gary Kirkham wrote:
laughing at you behind your back.
Mine does that a lot!
Jon Smith & Wesson: The original point and click interface
I would settle for that...mine openly mocks me.
Gary Kirkham Forever Forgiven and Alive in the Spirit The fool has said in his heart, "There is no God" Me blog, You read
-
Gary Kirkham wrote:
it could be skipping the loop altogether and laughing at you behind your back.
hehehehe anyway it is runing for more than 1 hour so far what i got is 154500000
OK - I just ran it and it took 8 seconds.
static void Main(string[] args)
{
Console.WriteLine(DateTime.Now.ToString());
for (int i = 0; i < int.MaxValue; i++)
{
if (i == int.MaxValue - 2)
{
Console.WriteLine("Hi");
}
}
Console.WriteLine(DateTime.Now.ToString());
Console.ReadLine();
}Two things come to mind - why do you want to do this and do you realise you just asked a programming question in the lounge?
Deja View - the feeling that you've seen this post before.
-
how long does it take for a computer to count from 0 to the maximum value of int ??
You can't do that on Vista unless you have SP1 because Vista never finishes calculating how long it's going to take.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Release, Debug or Plain English?
Deja View - the feeling that you've seen this post before.
Pete O'Hanlon wrote:
Plain English
Shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!
-
You can't do that on Vista unless you have SP1 because Vista never finishes calculating how long it's going to take.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001On Vista, the answer is "2 seconds remaining." and remains that way till the Sun shrinks to the size of a lump of coal.
Deja View - the feeling that you've seen this post before.
-
But unless the loop writes something then how do you know the computer is counting...it could be skipping the loop altogether and laughing at you behind your back.
Gary Kirkham Forever Forgiven and Alive in the Spirit The fool has said in his heart, "There is no God" Me blog, You read
:laugh: Mine does this all the time - lousy computer!
-
Pete O'Hanlon wrote:
Plain English
Shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!
It's like Candyman. If you say Plain English 3 times, up pops Osmo.
Deja View - the feeling that you've seen this post before.
-
On Vista, the answer is "2 seconds remaining." and remains that way till the Sun shrinks to the size of a lump of coal.
Deja View - the feeling that you've seen this post before.
Nonsense - Vista recognises such an operation as a security risk, prompts the user for administrative access and then refuses to run the task regardless :)
-
OK - I just ran it and it took 8 seconds.
static void Main(string[] args)
{
Console.WriteLine(DateTime.Now.ToString());
for (int i = 0; i < int.MaxValue; i++)
{
if (i == int.MaxValue - 2)
{
Console.WriteLine("Hi");
}
}
Console.WriteLine(DateTime.Now.ToString());
Console.ReadLine();
}Two things come to mind - why do you want to do this and do you realise you just asked a programming question in the lounge?
Deja View - the feeling that you've seen this post before.
i m doing it just fo fun :d
-
Nonsense - Vista recognises such an operation as a security risk, prompts the user for administrative access and then refuses to run the task regardless :)
doing it under XP Pro SP2
-
It's like Candyman. If you say Plain English 3 times, up pops Osmo.
Deja View - the feeling that you've seen this post before.
Hmmm. I always thought of him as more as a noxious cloud of bum gas: invisible, lingering and stinking up the joint a treat. :)
-
how long does it take for a computer to count from 0 to the maximum value of int ??
What computer? What language? What compiler? What version of compiler... I guess you’re not interested in result of 16-bit DOS program compiled by compiler with
sizeof(int) = 4
that runs in 32-bit protected mode extender inside virtual 16-bit DOS box on 32-bit Windows 98 running on virtual machine run by 32-bit VirtualPC on 64-bit Vista through WoW64? Or maybe you are? :~Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)
-
doing it under XP Pro SP2
I'm not sure I care.
-
OK - I just ran it and it took 8 seconds.
static void Main(string[] args)
{
Console.WriteLine(DateTime.Now.ToString());
for (int i = 0; i < int.MaxValue; i++)
{
if (i == int.MaxValue - 2)
{
Console.WriteLine("Hi");
}
}
Console.WriteLine(DateTime.Now.ToString());
Console.ReadLine();
}Two things come to mind - why do you want to do this and do you realise you just asked a programming question in the lounge?
Deja View - the feeling that you've seen this post before.
-
how long does it take for a computer to count from 0 to the maximum value of int ??
yassir hannoun wrote:
how long does it take for a computer to count from 0 to the maximum value of int ??
get your stop watch ready! okay.... start.... Now! okay... done... How long was that?
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
how long does it take for a computer to count from 0 to the maximum value of int ??
Longer than im willing to sit there waiting... :D
Mark Brock Click here to view my blog