<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Codec &#187; time</title>
	<atom:link href="http://www.trembl.org/codec/tag/time/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trembl.org/codec</link>
	<description>A Personal Polylogic Code/Decode &#039;Zettelkasten&#039;</description>
	<lastBuildDate>Thu, 02 Feb 2012 03:38:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Getting current Time with Microseconds</title>
		<link>http://www.trembl.org/codec/420/</link>
		<comments>http://www.trembl.org/codec/420/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 08:22:09 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[micro]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[seconds]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[usec]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=420</guid>
		<description><![CDATA[#import &#38;lt;sys/time.h&#38;gt; &#160; struct&#60;/span&#62; timeval tv; gettimeofday&#40;&#38;tv, NULL&#41;; int sec = tv.tv_sec; int usec = tv.tv_usec; The system&#8217;s notion of the current Greenwich time and the current time zone is obtained with the gettimeofday() call, and set with the ettimeofday() call. The time is expressed in seconds and microseconds since midnight (0 hour), January 1, [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &amp;lt;sys/time.h&amp;gt;</span>
&nbsp;
struct&lt;<span style="color: #002200;">/</span>span&gt; timeval tv;
gettimeofday<span style="color: #002200;">&#40;</span><span style="color: #002200;">&amp;</span>tv, <span style="color: #a61390;">NULL</span><span style="color: #002200;">&#41;</span>;
<span style="color: #a61390;">int</span> sec <span style="color: #002200;">=</span> tv.tv_sec;
<span style="color: #a61390;">int</span> usec <span style="color: #002200;">=</span> tv.tv_usec;</pre></div></div>

<blockquote><p>The system&#8217;s notion of the current Greenwich time and the current time zone is obtained with the gettimeofday() call, and set with the ettimeofday() call.  The time is expressed in seconds and microseconds since midnight (0 hour), January 1, 1970.  The resolution of the system clock is hardware dependent, and the time may be updated continuously or in &#8220;ticks.&#8221;  If tp is NULL and tzp is non-NULL, gettimeofday() will opulate the timezone struct in tzp.  If tp is non-NULL and tzp is NULL, then only the timeval struct in tp is populated. If both tp and tzp are NULL, nothing is returned.</p></blockquote>
<p>Check out the man page for more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/420/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Absolute Time</title>
		<link>http://www.trembl.org/codec/87/</link>
		<comments>http://www.trembl.org/codec/87/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 07:12:23 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[absolute]]></category>
		<category><![CDATA[interval]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=87</guid>
		<description><![CDATA[Several ways: CFAbsoluteTime abso = CFAbsoluteTimeGetCurrent(); NSTimeInterval inter = [NSDate timeIntervalSinceReferenceDate]; Plus other, more unix intrinsic methods like gettimeofday and mach_absolute_time. The above mentioned methods shall suffice for our needs.]]></description>
			<content:encoded><![CDATA[<p>Several ways:</p>
<p><code>CFAbsoluteTime abso = CFAbsoluteTimeGetCurrent();<br />
NSTimeInterval inter = [NSDate timeIntervalSinceReferenceDate];</code></p>
<p>Plus other, more unix intrinsic methods like gettimeofday and mach_absolute_time. The above mentioned methods shall suffice for our needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/87/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delay method execution &amp; passing objects along the way</title>
		<link>http://www.trembl.org/codec/58/</link>
		<comments>http://www.trembl.org/codec/58/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:31:46 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[performSelector]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=58</guid>
		<description><![CDATA[Specific example. Deselect table cell after a certain time. TableView and indexPath are wrapped into an array and send along to the method for delayed execution. - (void)tableView:(UITableView *)tView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"User selected row %d\n", [indexPath row] + 1); // actions [self performSelector:@selector(deselectTableCell:) withObject:[NSArray arrayWithObjects:tView, indexPath, nil] afterDelay:0.2f]; } -(void) deselectTableCell:(NSArray *)array { [[ [...]]]></description>
			<content:encoded><![CDATA[<p>Specific example. Deselect table cell after a certain time. TableView and indexPath are wrapped into an array and send along to the method for delayed execution.</p>
<p><code><br />
- (void)tableView:(UITableView *)tView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {<br />
	NSLog(@"User selected row %d\n", [indexPath row] + 1);<br />
	// actions<br />
	[self performSelector:@selector(deselectTableCell:) withObject:[NSArray arrayWithObjects:tView, indexPath, nil] afterDelay:0.2f];<br />
}</p>
<p>-(void) deselectTableCell:(NSArray *)array {<br />
	[[ [array objectAtIndex:0] cellForRowAtIndexPath:[array objectAtIndex:1] ] setSelected:NO];<br />
	NSLog(@"deselectTableCell" );<br />
}<br />
</code></p>
<p>In additon to <a href="http://www.trembl.org/codec/35/">http://www.trembl.org/codec/35/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/58/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Delay method execution</title>
		<link>http://www.trembl.org/codec/35/</link>
		<comments>http://www.trembl.org/codec/35/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 10:08:03 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=35</guid>
		<description><![CDATA[[self performSelector:@selector(methodName) withObject:nil afterDelay:0.10f]; update: http://www.trembl.org/codec/58/]]></description>
			<content:encoded><![CDATA[<p>[self performSelector:@selector(methodName) withObject:nil afterDelay:0.10f];</p>
<p>update: <a href="http://www.trembl.org/codec/58/">http://www.trembl.org/codec/58/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/35/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

