title: Simple math/programming question. Individual percentage from total
body: <p>I'm no good at math. :) Is this right?</p>
  
  <p>I'm accumulating all CPU seconds, and I need to find what percentage the addon's CPU time is from the total.</p>
  
  <pre><code>function PluginResources.GetTotalCPU(addon)
      UpdateAddOnCPUUsage()
      local totalCPU = 0
      for i=1, GetNumAddOns() do
          totalCPU = totalCPU + (GetAddOnCPUUsage(i) )
      end 
      local addonUsage = GetAddOnCPUUsage(addon)
      local usage = totalCPU / addonUsage
      return usage
  end
  </code></pre>