Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Show with time in millis

By: ace on Mar 1st, 2011  |  syntax: None  |  size: 0.57 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /**
  2.  * Write a description of class Show here.
  3.  *
  4.  * @author (your name)
  5.  * @version (a version number or a date)
  6.  */
  7. public class Show
  8. {
  9.     private long runtimeInMillis;
  10.     private String title;
  11.  
  12.     public Show(int hh, int mm, String title){
  13.         runtimeInMillis(hh, mm);
  14.         this.title = title;
  15.     }
  16.    
  17.     private void runtimeInMillis(int hh, int mm){
  18.         long millis = 0;
  19.         millis += hh*60*60*1000; //60 min per hour, 60 sec per min, 1000 millis per sec
  20.         millis += mm*60*1000;
  21.         runtimeInMillis = millis;
  22.     }
  23.        
  24. }