When you use WAP, you should exclude certain APIs from analysis because they either make callbacks into the application or wait for some event to take place. You shouldn't concern yourself with time spent in these APIs.
Certain parent APIs call back into the application to complete their task. It may so happen that, in this process, the application might make certain other child API calls. The times for executing the child APIs are included in the time for the parent API in addition to being reported for the child API.
There are other APIs that wait on events; for example, user input. An example of this is DialogBox, which waits for the user to respond. Another example is WaitMessage, where the application is suspended and control is yielded to other applications until a message is placed in the queue of the application under consideration.
Representative APIs in these categories include the following: