Approach #1 Brute Force [Accepted]
Algorithm
There are two situations about adjacent point

point[i+1]  point [i] <= duration (time of poisoned condition) .

point[i+1]  point [i] > duration .
every point will refresh the time of poisoned condition.
c++
class Solution {
public:
int findPoisonedDuration(vector<int>& timeSeries, int duration) {
if( timeSeries.size() == 0 ) return 0;
int ans = 0 ;
for ( int i = 0 ; i < timeSeries.size()  1 ; i ++ ) {
if( timeSeries[i+1]  timeSeries[i] <= duration ) {
ans += timeSeries[i+1]  timeSeries[i] ;
}
else {
ans += duration ;
}
}
ans += duration ;
return ans ;
}
};
Complexity Analysis
 Time complexity : $O(n)$.
 Space complexity: $O(1)$.