Java Millisecond Convert convertToMillis(String time)

Here you can find the source of convertToMillis(String time)

Description

convert To Millis

License

Open Source License

Declaration

public static int convertToMillis(String time) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int convertToMillis(String time) {
        int millis = 100;
        try {//  w  w  w .  j  a va  2 s . c o  m
            millis = Integer.parseInt(time);
        } catch (NumberFormatException nfe) {
            System.out.println("" + nfe.getMessage());
            nfe.printStackTrace();
        }
        return millis;
    }
}

Related

  1. convertMillisToTime(String val)
  2. convertNanosecondToMillisecondString(final long nanos)
  3. convertTimeMillisToHexString(long currentDate)
  4. convertTimeToDurationMilliseconds(String time)
  5. convertToMillis(float timeInSeconds)
  6. convertToMilliseconds(String value)
  7. getDuration(final long millis)
  8. getDurationBreakdown(long durationInMillis)
  9. getDurationMillisecond(Date date1, Date date2)