System.nanoTime()
の結果を日付に変換したい。
public void tempBan(Player p, Player banner, int timeInSeconds){
Long timeInNano = (long) (timeInSeconds * 10^9);
int newTime = (int) (System.nanoTime() + timeInNano);
// here I want to convert newTime to a date
}
10^9 を掛けて、秒をナノ秒に変換しました。次に、現在のシステム時刻と、ナノ秒に変換したパラメーターを日付に変換する必要があります。