Here you can find the source of getMinutesInSecWOHours(long sec)
Parameter | Description |
---|---|
sec | les secondes a calculer. |
public static float getMinutesInSecWOHours(long sec)
//package com.java2s; /*//from w w w.j a v a2s.c o m * This file is part of Java Tools for hdsdi3g'. * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * Copyright (C) hdsdi3g for hd3g.tv 2009-2012 * */ public class Main { /** * @param sec les secondes a calculer. * @return le nombre de minutes que contient sec sans les heures. * @see getHoursInSec. */ public static float getMinutesInSecWOHours(long sec) { float _diff_hours = (float) sec / 3600f; // en heures,minutes int diff_hours = (int) Math.floor(_diff_hours); // en heures return ((float) _diff_hours - (float) diff_hours) * 60f; } }