none
Incomplete informations about System.Timers.Timer RRS feed

  • Question

  • Hello,

     

    This post is resulting of a thread about the use of timers with a very long interval

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2942850&SiteID=1

    The two last posts are really interesting

     

    When i access to the page about System.Tmers.Timer.Interval

    http://msdn2.microsoft.com/en-us/library/system.timers.timer.interval.aspx

     

    I can see that interval is a Double with the possibility of ArgumentException ( The interval is less than or equals to zero )

     

    But when i am searching about System.Timers.Timer(Double) , i discover that the interval which is the parameter of the constructor must be less than Int32.MaxValue.

     

    I suppose that in this constructor , Microsoft is using not a double parameter but a Int32 one ( maybe thru a conversion ) and that's the explanation of the limit of Int32.MaxValue.

     

    I would suggest to correct the documentation so in each page of Systems.Timers.Timer ( and also  System.Threading.Timer)  speaking about the interval,the reader can see that the interval must be less Int32.MaxValue.

     

    I suppose that Microsoft , with the fact of a double parameter, is preparing the passage to 64-bit of the .Net Framework

     

    Sorry for my poor english

     

    Have a nice day

     

    Wednesday, March 5, 2008 1:25 PM

Answers

  • Hi Papy - Interesting discovery!  There are two ways you can communicate feedback like this about specific content pages:

     

    #1: ideally, just add the info above to the page itself so all users can see it!  The MSDN Library has a "community content" feature where you can add notes and samples directly to the page. Just scroll down to the end of the Library page and click "Add community content".

     

    #2: you can also send private feedback to the documentation team via the "Click to Rate and Give Feedback" link in the right-hand part of the page, near the top of the page.

     

    BTW, the use of a double type here is probably not to support 64-bit, it's probably there to support fractional times shorter than one second or not aligned neatly on second boundaries.

    Sunday, March 9, 2008 3:48 PM

All replies

  • Hi Papy - Interesting discovery!  There are two ways you can communicate feedback like this about specific content pages:

     

    #1: ideally, just add the info above to the page itself so all users can see it!  The MSDN Library has a "community content" feature where you can add notes and samples directly to the page. Just scroll down to the end of the Library page and click "Add community content".

     

    #2: you can also send private feedback to the documentation team via the "Click to Rate and Give Feedback" link in the right-hand part of the page, near the top of the page.

     

    BTW, the use of a double type here is probably not to support 64-bit, it's probably there to support fractional times shorter than one second or not aligned neatly on second boundaries.

    Sunday, March 9, 2008 3:48 PM
  • Hello,

     

    I've a big problem : my english is not very good and i find that would be an insult for this very good site to insert comments in bad english or worst that my comments are false because i don't use right words.

     

    I think that i will use the second way but not now, i need before to find somebody who will be able to correct my english

     

    Thank you very much to have had a glance on my "request" and for your explanation.

     

    Have a nice day

     

    Sunday, March 9, 2008 5:35 PM