title: Converting a decimal time number (such as 23.33154) to seconds in Python?
body: <p>Im trying to convert a decimal time number such as 23.456, 0.5555, 1.9999 etc. to seconds (as a whole number).</p>
  
  <p>I have made a function that converts the decimal time to hours and minutes.
  For example, converting to hours:</p>
  
  <pre><code>def decimal_to_hours(t)
      return math.floor(t)
  </code></pre>
  
  <p>And then for decimal time to minutes:</p>
  
  <pre><code>def decimal_to_mins(t)
      if t &lt; 1:
          return math.floor(t * 60)
  
      if t % 1 == 0:
          return 0
  
      elif t &gt; 1:
          return math.floor((t - math.floor(t)) * 60) 
  </code></pre>
  
  <p>So my problem is I don't know how I would convert the fraction to seconds. Any help would be apreciated.</p>