标签: c# async-await task-parallel-library
在C#中,如何获取剩余的时间,之后CancellationToken将被取消?
CancellationToken
async Task<int> Get(CancellationToken ct) { // How do I get the time after which ct will be cancelled ? // DateTime maxTimeToExecuteThisMethod = ? }