<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic time.h    clock() in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/time-h-clock/m-p/191062#M4845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is&amp;nbsp; possible to use the function clock() of time.h library on the simulator of DSC 5600E?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I am treating to use it, but errors as shown belown apear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;undefined identifier clok_t&lt;/P&gt;&lt;P&gt;function Fclock has no prototype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is realy urgent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;time.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;&lt;BR /&gt;clock_t clock(void);&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; clock_t start, end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;start = clock();&lt;/P&gt;&lt;P&gt;//,,,,my code //&lt;/P&gt;&lt;P&gt;end = clock( );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;elapsed = end - start;&lt;BR /&gt;printf("Elapsed time: %Lu \n", elapsed);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;} &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Apr 2010 13:36:16 GMT</pubDate>
    <dc:creator>dlf</dc:creator>
    <dc:date>2010-04-12T13:36:16Z</dc:date>
    <item>
      <title>time.h    clock()</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/time-h-clock/m-p/191062#M4845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is&amp;nbsp; possible to use the function clock() of time.h library on the simulator of DSC 5600E?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I am treating to use it, but errors as shown belown apear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;undefined identifier clok_t&lt;/P&gt;&lt;P&gt;function Fclock has no prototype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is realy urgent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;time.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;&lt;BR /&gt;clock_t clock(void);&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; clock_t start, end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;start = clock();&lt;/P&gt;&lt;P&gt;//,,,,my code //&lt;/P&gt;&lt;P&gt;end = clock( );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;elapsed = end - start;&lt;BR /&gt;printf("Elapsed time: %Lu \n", elapsed);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;} &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 13:36:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/time-h-clock/m-p/191062#M4845</guid>
      <dc:creator>dlf</dc:creator>
      <dc:date>2010-04-12T13:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: time.h    clock()</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/time-h-clock/m-p/191063#M4846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Check the doucmentation to see if this function is supported by the libraries. According to the MSL C manual that describes the clock() function, it also mentions that some MSL implementations might not support this feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) You may be linking in the wrong library, or failing to link the library that has this function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) I am not sure why you're decalreing a function prototype for clock in your code. The header file should handle that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 18:52:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/time-h-clock/m-p/191063#M4846</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2010-04-15T18:52:17Z</dc:date>
    </item>
  </channel>
</rss>

