code: public double getAccumulatedExecutionTimeAllThreads(Device device) {
        KernelProfile profile = KernelManager.instance().getProfile(getClass());
        synchronized (profile) {
      	  KernelDeviceProfile deviceProfile = profile.getDeviceProfile(device);
      	  if (deviceProfile == null) {
      		  return Double.NaN;
      	  }
      	  return deviceProfile.getCumulativeElapsedTimeAllGlobal() / KernelProfile.MILLION;
        }
     }
docs: Determine the total execution time of all produced profile reports from all threads that executed the
  current kernel on the specified device.
  <br/>
  <b>Note1: </b>This is the recommended method to retrieve the accumulated execution time, even
  when doing multithreading for the same kernel and device.
  <br/>
  Note that this will include the initial conversion time.
  
  @param the device of interest where the kernel executed
  
  @return <ul><li>The total time spent executing the kernel (ms)</li>
  <li>NaN, if no profiling information is available</li></ul>
  
  @see #getProfileReportCurrentThread(Device)
  @see #getProfileReportLastThread(Device)
  @see #registerProfileReportObserver(IProfileReportObserver)
  @see Kernel#getAccumulatedExecutionTimeCurrentThread(Device)