<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-1%3Azyan057</id>
	<title>SE250:lab-1:zyan057 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-1%3Azyan057"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-1:zyan057&amp;action=history"/>
	<updated>2026-04-30T18:42:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE250:lab-1:zyan057&amp;diff=4591&amp;oldid=prev</id>
		<title>Mark: 4 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-1:zyan057&amp;diff=4591&amp;oldid=prev"/>
		<updated>2008-11-03T05:18:46Z</updated>

		<summary type="html">&lt;p&gt;4 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;At first I tried to use clock() function in c to time one single addition in C. But the computer is too fast and all you can get is 0.00000 second.&lt;br /&gt;
Therefore I wrote a loop to do 1000000000 additions and use the clock() function to find out the total time.&lt;br /&gt;
&lt;br /&gt;
Here is the code I have used...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void main() &lt;br /&gt;
{&lt;br /&gt;
    long time,a=0; &lt;br /&gt;
    time = clock();&lt;br /&gt;
    for (int b=0;b&amp;lt;1000000000;b++) &lt;br /&gt;
    { &lt;br /&gt;
        a++; &lt;br /&gt;
    }&lt;br /&gt;
    time = (clock() - time);&lt;br /&gt;
    printf(&amp;quot;%ld \n&amp;quot;, time);&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
The results for int, long and short were similar, which were about 2300.&lt;br /&gt;
The double and float type took longer to calculate, the results were above 8000.&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>