Back to project page trafficcop.
The source code is released under:
Apache License
If you think the Android project trafficcop listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.willowtreeapps.trafficcop; // ww w. ja v a2 s . c om /** * A time unit with the base of seconds. */ public enum TimeUnit { SECOND(1), SECONDS(1), MINUTE(60), MINUTES(60), HOUR(60 * 60), HOURS(60 * 60), DAY(60 * 60 * 24), DAYS(60 * 60 * 24), WEEK(60 * 60 * 24 * 7), WEEKS(60 * 60 * 24 * 7); private int scale; TimeUnit(int scale) { this.scale = scale; } /** * Converts the value from this unit to seconds * * @param value the time in this unit * @return the time in seconds */ public int of(int value) { return value * scale; } }