Skip to content

Conversation

ygj6
Copy link

@ygj6 ygj6 commented May 30, 2019

Sometimes I want to check the value of pending field of struct timeouts for debug, then I implement this function.In my other c file, I can use it as this:

void logPendings(struct timeouts *T)
{
    int i;
    uint64_t *pendings;
    int wheel = timeouts_pendings(T, &pendings);
    for (i = 0; i < wheel; ++i) {
        printf("%016llx \n", pendings[i]);
    }
    printf("\n");
    free(pendings);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant