title: Mock method implementation using Google Mock
body: <p>I'm mocking Arduino <a href="https://www.arduino.cc/en/Reference/Millis" rel="noreferrer"><code>millis</code></a> method using Google Mock. This method returns number of milliseconds since device starts. I would like to return increased number (in range 0 to Infinity) on every method call.</p>
  
  <p>So far, I'm mocking this function like that:</p>
  
  <pre><code>EXPECT_CALL(*arduino, millis())
    .WillOnce(Return(0))
    .WillOnce(Return(1))
    .WillOnce(Return(2))
    // and so on...
  </code></pre>
  
  <p>But it's impractical. Is there a better way which works on infinite number of calls?</p>