VirtualBox

Changeset 9937 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jun 25, 2008 6:18:13 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
32360
Message:

Main: Corrected getProcessorUsage() impl (docs, spacing etc).

Location:
trunk/src/VBox/Main/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/HostImpl.h

    r9904 r9937  
    110110    STDMETHOD(RemoveUSBDeviceFilter) (ULONG aPosition, IHostUSBDeviceFilter **aFilter);
    111111
    112     STDMETHOD(GetProcessorUsage) (ULONG *user, ULONG *system, ULONG *idle);
     112    STDMETHOD(GetProcessorUsage) (ULONG *aUser, ULONG *aSystem, ULONG *aIdle);
    113113
    114114    // public methods only for internal purposes
     
    170170#endif
    171171
     172#ifdef VBOX_WITH_RESOURCE_USAGE_API
     173    /** Static timer callback. */
     174    static void UsageSamplerCallback (PRTTIMER pTimer, void *pvUser, uint64_t iTick);
     175    /** Member timer callback. */
     176    void usageSamplerCallback();
     177#endif /* VBOX_WITH_RESOURCE_USAGE_API */
     178
    172179    ComObjPtr <VirtualBox, ComWeakRef> mParent;
    173180
     
    180187
    181188#ifdef VBOX_WITH_RESOURCE_USAGE_API
    182     /** Static timer callback. */
    183     static void staticSamplerCallback(PRTTIMER pTimer, void *pvUser, uint64_t iTick);
    184     /** Member timer callback. */
    185     void usageSamplerCallback();
    186 
    187189    /** Pointer to the usage sampling timer. */
    188     PRTTIMER m_pUsageSampler;
    189     /** Time stamp of the last taken sample. */
    190     //uint64_t m_tsLastSampleTaken;
     190    PRTTIMER mUsageSampler;
    191191    /** Structure to hold processor usage stats. */
    192     RTCPUUSAGESTATS m_CpuStats;
     192    RTCPUUSAGESTATS mCpuStats;
    193193#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    194194};
  • trunk/src/VBox/Main/include/MachineImpl.h

    r9904 r9937  
    168168        ComObjPtr <Snapshot> mFirstSnapshot;
    169169        ComObjPtr <Snapshot> mCurrentSnapshot;
     170
     171#ifdef VBOX_WITH_RESOURCE_USAGE_API
     172        /** Pointer to the usage sampling timer. */
     173        PRTTIMER mUsageSampler;
     174        /** Structure to hold processor usage stats. */
     175        RTPROCCPUUSAGESTATS mCpuStats;
     176#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    170177    };
    171178
     
    713720    void copyFrom (Machine *aThat);
    714721
     722#ifdef VBOX_WITH_RESOURCE_USAGE_API
     723    /** Static timer callback. */
     724    static void UsageSamplerCallback (PRTTIMER pTimer, void *pvUser, uint64_t iTick);
     725    /** Member timer callback. */
     726    void usageSamplerCallback();
     727#endif /* VBOX_WITH_RESOURCE_USAGE_API */
     728
    715729    const InstanceType mType;
    716730
     
    745759    friend class SessionMachine;
    746760    friend class SnapshotMachine;
    747 
    748 #ifdef VBOX_WITH_RESOURCE_USAGE_API
    749     /** Static timer callback. */
    750     static void staticSamplerCallback(PRTTIMER pTimer, void *pvUser, uint64_t iTick);
    751     /** Member timer callback. */
    752     void usageSamplerCallback();
    753     /** Pointer to the usage sampling timer. */
    754     PRTTIMER m_pUsageSampler;
    755     /** Structure to hold processor usage stats. */
    756     RTPROCCPUUSAGESTATS m_CpuStats;
    757 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
    758761};
    759762
     
    826829        IConsole *aInitiator, MachineState_T *aMachineState, IProgress **aProgress);
    827830
    828     /* We need to override and call real Machine's method. */
    829     STDMETHOD(GetProcessorUsage) (ULONG *user, ULONG *system);
    830 
    831831    // public methods only for internal purposes
    832832
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette