If you've ever seen the ethereum blocktime chart, you've noticed that always it's between 10-19 and when ever it comes bigger than, network will set difficulty lower than before and again the block time is between 10 and 19.
Is there any config in genesis or somewhere to set this time?

2 Answers
2

@RomanFrolov's answer is good; because my extension doesn't easily fit in a comment, I'm adding it as another answer.

There is no such thing as a minimum or maximum block time. There is a target time and a difficulty adjusting algorithm (as described by @RomanFrolov) that attempts to maintain the target time. Note sure where your 10-19s comes from because the normal range is actually a fair bit larger, unless you're looking at averages over longer periods of time. The mining of a block is a probabilistic event that can is described by a Poisson distribution. We can see from a Poisson table that the probability of having more than zero blocks after 10.5s (70% of the current target block time) is 1 - 0.4966, or about 50%. The probability of no blocks for 21 seconds (140% of the current target block time) is 0.2466 -- or about 25%.

When you're looking at averages of larger sets, you can see, for example lambda=15 (225s) that, suddenly, the probability of seeing fewer than 11 blocks in that period (for an average block time of 20s) is about 10% (which is less probably than we found for single blocks at 21s). Similarly, the odds of finding more than 22 (10s average block time) is 1 - 0.9673 -- or about 3%. If you take the average block time for every 100 blocks, the range quickly converges to 15s and the 95% interval shrinks to what you observe.