Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

currentTimeMillis() returns type long, but in SearchTimer.measure we are returning an int. Shouldn we return a long since we are using System.currentTimeMillis()?

0
Posted

currentTimeMillis() returns type long, but in SearchTimer.measure we are returning an int. Shouldn we return a long since we are using System.currentTimeMillis()?

0

Indeed! Yes, please do fix this, and replace the relevant types to long. If you have explicitly cast things to int, the timing still should work, from what I know. If you have done this and the timing results are clear, you may leave it as is. Thanks.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123