Skip to content

Instantly share code, notes, and snippets.

@ethanmpeterson
Created December 5, 2016 13:13
Show Gist options
  • Select an option

  • Save ethanmpeterson/80956e0b7a9a9b993c0f89f379617adc to your computer and use it in GitHub Desktop.

Select an option

Save ethanmpeterson/80956e0b7a9a9b993c0f89f379617adc to your computer and use it in GitHub Desktop.
func timeDifference(firstHour : Int, firstMinute : Int, secondHour : Int, secondMinute : Int) -> Int {
return abs(((firstHour * 60) + firstMinute) - ((secondHour * 60) + secondMinute))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment