Java Milliseconds milliseconds(int offset)

Here you can find the source of milliseconds(int offset)

Description

milliseconds

License

Apache License

Declaration

public static Date milliseconds(int offset) 

Method Source Code

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

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static Date milliseconds(int offset) {
        Calendar c = Calendar.getInstance();
        c.set(Calendar.MILLISECOND, c.get(Calendar.MILLISECOND) + offset);
        return c.getTime();
    }/*  ww  w. j av a  2 s.com*/

    public static Date milliseconds(long offset) {
        return milliseconds((int) offset);
    }
}

Related

  1. microsToMillis(long sec, long usec)
  2. milliDate(String date)
  3. millisBetween(Date firstDate, Date lastDate)
  4. millisecond(final Date date)
  5. millisecondOf(Date date)
  6. millisecondsBetween(Date start, Date finish)
  7. millisecondsSinceMidnight(Date date)
  8. millisToDate(String stime)
  9. minutusAndSecondsFromMillis(long millis)