Here you can find the source of HoursToSeconds(final float hours)
public static long HoursToSeconds(final float hours)
//package com.java2s; /*//from w w w .j av a 2 s.c om * Copyright (c) 2015. Sandata Technologies, LLC * 26 Harbor Park Drive, Port Washington, NY 11050, 800-544-7263 * All rights reserved. * * This software is the confidential and proprietary information of Sandata Technologies, LLC * ("Confidential Information"). You shall not disclose such Confidential Information and shall * use it only in accordance with the terms of the license agreement you entered into with * Sandata. */ public class Main { public static final int MINUTES_IN_AN_HOUR = 60; public static final int SECONDS_IN_A_MINUTE = 60; public static long HoursToSeconds(final float hours) { return (long) (hours * MINUTES_IN_AN_HOUR * SECONDS_IN_A_MINUTE); } }