Code example for TimeUnit

Methods: toSeconds

0
 
	} 
 
	@SuppressWarnings("boxing") 
	protected String getAsTime(int t) {
		return String.format("%02d:%02d", TimeUnit.MILLISECONDS.toSeconds(t) / 60, TimeUnit.MILLISECONDS.toSeconds(t) - TimeUnit.MILLISECONDS.toSeconds(t) / 60
				* 60); 
	} 
 
	private void shuffleNext() { 
		String shuffleUrl = R.string.host + "services/music.php?v=2.0&a=shuffle.next";
		String musicJson = res.getString(R.string.json);
		Log.i("MusicActivity", musicJson);
		JSONObject musicDetails = null;
		try { 
			musicDetails = new JSONObject(musicJson);
		} catch (JSONException e) {
			Log.e("MusicActivity", "Error parsing JSON");
			// e.printStackTrace(); 
		} 
		try {