<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Timestamp mit Milisekunden]]></title><description><![CDATA[<p>Hallo zusammen, ich brächte eine Funktion welche mir einen Timestamp mit Milisekunden in einem String ablegt. Ich habe momentan folgendes:</p>
<pre><code class="language-cpp">string getTimestamp()	{

		time_t t;
		struct tm * timeinfo;
		char buffer [80];

		//time (&amp;t);
		//timeinfo = localtime (&amp;t);

		strftime(buffer,80,&quot;%X&quot;,timeinfo);
		string value;
		value = buffer;

		return value;

						 }
</code></pre>
<p>wie bekomme ich da die Milisekunden mit rein? Kann mir da jemand helfen?</p>
<p>Danke schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/272789/timestamp-mit-milisekunden</link><generator>RSS for Node</generator><lastBuildDate>Fri, 28 Aug 2026 16:32:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/272789.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Aug 2010 10:18:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Timestamp mit Milisekunden on Wed, 25 Aug 2010 10:18:08 GMT]]></title><description><![CDATA[<p>Hallo zusammen, ich brächte eine Funktion welche mir einen Timestamp mit Milisekunden in einem String ablegt. Ich habe momentan folgendes:</p>
<pre><code class="language-cpp">string getTimestamp()	{

		time_t t;
		struct tm * timeinfo;
		char buffer [80];

		//time (&amp;t);
		//timeinfo = localtime (&amp;t);

		strftime(buffer,80,&quot;%X&quot;,timeinfo);
		string value;
		value = buffer;

		return value;

						 }
</code></pre>
<p>wie bekomme ich da die Milisekunden mit rein? Kann mir da jemand helfen?</p>
<p>Danke schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944138</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944138</guid><dc:creator><![CDATA[oNes]]></dc:creator><pubDate>Wed, 25 Aug 2010 10:18:08 GMT</pubDate></item><item><title><![CDATA[Reply to Timestamp mit Milisekunden on Wed, 25 Aug 2010 10:43:26 GMT]]></title><description><![CDATA[<p>Einfach mal auf <a href="http://www.cplusplus.com/reference/" rel="nofollow">www.cplusplus.com/reference/</a> suchen?<br />
<a href="http://www.cplusplus.com/reference/clibrary/ctime/strftime/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/ctime/strftime/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944146</guid><dc:creator><![CDATA[padreigh@work]]></dc:creator><pubDate>Wed, 25 Aug 2010 10:43:26 GMT</pubDate></item><item><title><![CDATA[Reply to Timestamp mit Milisekunden on Wed, 25 Aug 2010 10:54:19 GMT]]></title><description><![CDATA[<p>padreigh@work schrieb:</p>
<blockquote>
<p>Einfach mal auf <a href="http://www.cplusplus.com/reference/" rel="nofollow">www.cplusplus.com/reference/</a> suchen?<br />
<a href="http://www.cplusplus.com/reference/clibrary/ctime/strftime/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/ctime/strftime/</a></p>
</blockquote>
<p>Mh .. manchmal sollte ich selbst genauer lesen. Das kann keine ms. Mein Fehler. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Ich benutz meist Qt, da können die Date/DateTime Klassen millisekunden. Vielleicht kommt <a href="http://www.boost.org/doc/html/date_time.html" rel="nofollow">http://www.boost.org/doc/html/date_time.html</a> für dich in Frage?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944148</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944148</guid><dc:creator><![CDATA[padregh@work]]></dc:creator><pubDate>Wed, 25 Aug 2010 10:54:19 GMT</pubDate></item><item><title><![CDATA[Reply to Timestamp mit Milisekunden on Wed, 25 Aug 2010 10:58:04 GMT]]></title><description><![CDATA[<p>Eventuell acuh GetTickCount()?</p>
<p>Oli_1977</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944152</guid><dc:creator><![CDATA[Oli_1977]]></dc:creator><pubDate>Wed, 25 Aug 2010 10:58:04 GMT</pubDate></item><item><title><![CDATA[Reply to Timestamp mit Milisekunden on Wed, 25 Aug 2010 13:14:06 GMT]]></title><description><![CDATA[<p>danke für die Antworten!</p>
<p>GetTickCount() geht leider nicht da ich mit Linux arbeite.<br />
Ich habe mir die Boost geschichte mal angeschaut und denke das ptime schon ganz passend wäre.<br />
Ich habe nur Probleme das ganze in mein Projekt einzubinden. Wie mache ich denn das? Der ganze Code soll auf einen kleinen Controller mit wenig Speicherplatz und ich würde deshalb gerne nur die date_time Komponente von Boost einbinden. Und da eigentlich auch nur die posix_time. wie mache ich denn das? ich habe probiert den posix_time ordner in mein Projekt zu importieren und dann mit #include &quot;posix_time/posix_time.hpp&quot; einzuinden. Jedoch meckert er beim Kompilieren dass es dort keine Datei oder ein Verzeichniss gibt.</p>
<p>What to do?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944241</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944241</guid><dc:creator><![CDATA[oNes]]></dc:creator><pubDate>Wed, 25 Aug 2010 13:14:06 GMT</pubDate></item><item><title><![CDATA[Reply to Timestamp mit Milisekunden on Wed, 25 Aug 2010 13:25:42 GMT]]></title><description><![CDATA[<p>Benutz einfach boost so wie es vorgesehen ist. Vermutlich hast du irgendwelche Ordner oder Includepfade falsch gesetzt. Ich verstehe dein Argument nicht, wieso die normale Vorgehensweise dein Projekt unnötig vergrößern sollte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944248</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 25 Aug 2010 13:25:42 GMT</pubDate></item></channel></rss>