|
From: <dir...@us...> - 2009-09-16 11:05:59
|
Revision: 2105
http://shox.svn.sourceforge.net/shox/?rev=2105&view=rev
Author: dirk_held
Date: 2009-09-16 11:05:50 +0000 (Wed, 16 Sep 2009)
Log Message:
-----------
minor cleanups, changed comments and rearrangements.
Modified Paths:
--------------
trunk/src/net/sf/shox/simulator/util/Util.java
Modified: trunk/src/net/sf/shox/simulator/util/Util.java
===================================================================
--- trunk/src/net/sf/shox/simulator/util/Util.java 2009-09-14 12:52:47 UTC (rev 2104)
+++ trunk/src/net/sf/shox/simulator/util/Util.java 2009-09-16 11:05:50 UTC (rev 2105)
@@ -13,10 +13,25 @@
/** @return the current time in seconds. */
@SuppressWarnings("boxing")
- public static String time() {
+ public static String timeStr() {
return String.format(" time: %.3f", nowS());
}
+
+ /** @return the current time converted to a string. */
+ public static String nowStr() {
+ return Double.toString(nowS());
+ }
+ /** @return the current time converted to a 4 digit string. */
+ public static String nowStr4() {
+ return Double.toString(round4(nowS()));
+ }
+
+ /** @return the current simulation time converted to seconds. */
+ public static double nowS() {
+ return Configuration.getInstance().getSeconds(now());
+ }
+
/** @return the current simulation time. */
public static double now() {
return SimulationManager.getInstance().getCurrentTime();
@@ -31,21 +46,6 @@
return now() - x;
}
- /** @return the current simulation time. */
- public static double nowS() {
- return Configuration.getInstance().getSeconds(now());
- }
-
- /** @return the current time converted to a 4 digit string. */
- public static String nowStr() {
- return Double.toString(nowS());
- }
-
- /** @return the current time converted to a 4 digit string. */
- public static String nowStr4() {
- return Double.toString(round4(nowS()));
- }
-
/**
* method to round a given value to 2 digits.
* @param x the to be rounded value.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|