Java Second to Milliseconds secondsToMillis(int timeInSecs)

Here you can find the source of secondsToMillis(int timeInSecs)

Description

Converts seconds to milliseconds, with a precision of 1 second

License

Apache License

Parameter

Parameter Description
timeInSecs the time in seconds

Return

The equivalent time in milliseconds

Declaration

public static long secondsToMillis(int timeInSecs) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public final static int SECOND_IN_MILLISECONDS = 1000;

    /**//from   w  w  w .  j a  v  a 2  s. c  o m
      * Converts seconds to milliseconds, with a precision of 1 second
      * @param timeInSecs the time in seconds
      * @return The equivalent time in milliseconds
      */
    public static long secondsToMillis(int timeInSecs) {
        return timeInSecs * SECOND_IN_MILLISECONDS;
    }
}

Related

  1. second2Millisencond(int second)
  2. secondsSinceMillis(long timeInMillis)
  3. secondsToMillis(final long seconds)
  4. secondsToMillis(int seconds)
  5. secondsToMillis(long s)
  6. secondToMillis(int second)
  7. secsToMillisecs(long secs)