Here we go:<div><br></div><div><div>Clock c = new Clock();</div><div>while(true){</div><div><span class="" style="white-space:pre">        </span>System.out.println(c.getCurrentInterval());</div><div><span class="" style="white-space:pre">        </span>Thread.sleep(1000);</div>

<div>}</div></div><div><br></div><div><br></div><div>c.getCurrentInterval() is always the same :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/12/17 Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey my friend, welcome! Answers inline.<br>
<br>
<br>
--<br>
&quot;The measure of a man is what he does with power&quot; - Plato<br>
-<br>
@abstractj<br>
-<br>
Volenti Nihil Difficile<br>
<div class="im"><br>
<br>
<br>
On Sunday, December 16, 2012 at 8:27 PM, Daniel Manzke wrote:<br>
<br>
&gt; Hey guys,<br>
&gt;<br>
&gt; after 140 chars were not enough for matthias and bruno I decided to subscribe to the list. ;)<br>
&gt;<br>
&gt; 1:<br>
&gt; After working through aerogear-otp-java I took some hours to port it .NET. If you are interested I would like to contribute it after cleanup.<br>
&gt;<br>
&gt; Are you interested? :)<br>
</div>I&#39;m completely dumb on .net platform. Is it (<a href="https://github.com/manzke/aerogear-otp-dotnet" target="_blank">https://github.com/manzke/aerogear-otp-dotnet</a>) compatible with windows phone?<br>
<div class="im">&gt;<br>
&gt; 2:<br>
&gt; Due to the fact that we are using Mobile-OTP in hour company I also took some time and have implemented it.<br>
&gt; PoC is working.<br>
&gt; Pull-Request will be submitted if ready.<br>
&gt;<br>
&gt;<br>
&gt; Question: I saw that the Clock-Implementation is returning a static value for current time. So the token will be the same every time we call Totp.now().<br>
</div>Not really, do you have some scenario or unit test to reproduce it? The token will be the same during 30s only.<br>
<div class="im">&gt;<br>
&gt; Is it really what developers are expecting?<br>
<br>
</div>No, I&#39;d appreciate if you gist the sources to reproduce it, then we can find out what&#39;s wrong.<br>
<div class="im">&gt;<br>
&gt; If I call now, I expect the time it was called not created. :)<br>
&gt;<br>
&gt; Why not just use System.currentMilliSeconds()? It is UTC. ;)<br>
</div>I wouldn&#39;t like to trust in Java while we&#39;re dealing with timezones. System.currentMilliSeconds also works np on changing it, if the unit tests are passing.<br>
&gt;<br>
&gt;<br>
&gt; Bye,<br>
&gt; Daniel<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; aerogear-dev mailing list<br>
&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a> (mailto:<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>)<br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
<br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Viele Grüße/Best Regards<br><br>Daniel Manzke<br>
</div>