<?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>Transient Technology &#187; TimeUnit</title>
	<atom:link href="http://martinaharris.com/tag/timeunit/feed/" rel="self" type="application/rss+xml" />
	<link>http://martinaharris.com</link>
	<description>Next time you look it might be gone</description>
	<lastBuildDate>Tue, 24 Jan 2012 18:14:10 +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>TimeUnit use it more of the Time please!</title>
		<link>http://martinaharris.com/2010/01/timeunit-its-brill/</link>
		<comments>http://martinaharris.com/2010/01/timeunit-its-brill/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 20:45:49 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software quality]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[setter]]></category>
		<category><![CDATA[TimeUnit]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=600</guid>
		<description><![CDATA[Time for my first blog of the year. Yea! Mind you its a bit small, but then perhaps that is a good thing. Look at these two setters. Setter methods like the first example are very common. Take a look &#8230; <a href="http://martinaharris.com/2010/01/timeunit-its-brill/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Time for my first blog of the year.  Yea!  Mind you its a bit small, but then perhaps that is a good thing.</p>
<p>Look at these two setters.  Setter methods like the first example are very common.  Take a look at the second its so much better.  With the second the responsibility to convert is neatly delegated to another class instead of forcing the user of the api to work it out.  In addition the programmer can supply hours, minutes or any other that TimeUnit supports.</p>
<pre class="brush: java; light: true">
public void setDuration(long durationInMs) {
    this.duration = durationInMs;
}

public void setDuration(long duration, TimeUnit timeUnit) {
    this.duration = timeUnit.toMillis(duration);
}﻿
</pre>
<p>TimeUnit was brought to you by: java.util.concurrent.TimeUnit!  Its handy, so use it!  <img src='http://martinaharris.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F&amp;title=TimeUnit+use+it+more+of+the+Time+please%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F&amp;title=TimeUnit+use+it+more+of+the+Time+please%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F&amp;title=TimeUnit+use+it+more+of+the+Time+please%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F&amp;headline=TimeUnit+use+it+more+of+the+Time+please%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=TimeUnit+use+it+more+of+the+Time+please%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=TimeUnit+use+it+more+of+the+Time+please%21&amp;u=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=TimeUnit+use+it+more+of+the+Time+please%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=TimeUnit+use+it+more+of+the+Time+please%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=TimeUnit+use+it+more+of+the+Time+please%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F&amp;title=TimeUnit+use+it+more+of+the+Time+please%21&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F01%2Ftimeunit-its-brill%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2010/01/timeunit-its-brill/';
var dzone_title = 'TimeUnit use it more of the Time please!';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2010/01/timeunit-its-brill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

