How do I know my speed in this time interval?

I am reading a book on trigonometry and the next chapter is named 'Linear and Angular speeds'.So I started to think about linear speed.
I thought that I could drive a bicycle in $2$ ways.
Either I can go on driving it with a uniform speed or I can drive it the way I usually drive.
If I drove it with a uniform speed and covered $900$ $metres$ in $600$ $seconds$; then my average speed $=$ $1.5$ $m/s$.
In this case this average speed is also telling the amount of distance I covered in any interval of $1$ $sec$ in my ride$(1.5$ $m)$
But if I drive it like this;I go on increasing my speed till the moment I can,so my speed goes on increasing till the first $300$ $sec$,but after that I'm exhausted and I cannot push more;so I barely manage to somehow push the cycle for $300$ $sec$ more.
But this time also I cover $900$ $metres$ in $600$ $seconds$.
My average speed $=$ $1.5$ $m/s$.
But in this case my average speed definitely ain't telling me the amount of distance i covered in any time interval of $1$ $sec$ in my ride.
So,my question is that,suppose I want to know the distance I covered in the time interval $250sec$$-$$251sec$ of my second ride;is there any technology or equipment that can help me to know that?
And if there is, please give me an idea of how that device works.

I drew an s-t diagram (distance vs time) based on your description. All that is known is that in both cases you start at time 0 with 0 distance (i.e. the origin in the diagram) and reach a distance of 900 metres after 600 seconds ("finish", the upper right grey dot). In the first case you cycle at constant speed, which in this diagram corresponds to a straight line going from start to finish (red line). The velocity is the slope of that line which as you can see is constant, or said differently, the distance covered within 1 second will always be the same during your ride.

In the second case the only usable information you provide is that the velocity increases until 300 seconds and after that decreases. This is not enough information to completely determine your motion as you can see from the three blue lines in the diagram (and there are infinitely more possibilities which I did not draw). In the case of non-uniform velocity, the motion cannot be drawn by straight lines anymore. However it is still possible and meaningful to define a velocity. Physicists call this velocity the instantaneous velocity/speed and it is defined by the derivative:

$$v=\frac{ds}{dt}$$

Geometrically this is the slope of the tangent to the curve. Note that this also works for the uniform motion, because the "tangent" to the red line would be identical to the red line itself and its slope is the (uniform) velocity. So in that special case the instantaneous velocity and average/uniform velocity are the same.

Alternatively you can think of $ds$ and $dt$ as tiny intervals of distance/time (mathematically you let the time interval go to zero) and imagine your non-uniform motion consisting of lots of such intervals during which your motion is uniform, but each interval having a different velocity.

Coming back to your question: The distance covered between 250 and 251 seconds is given by the integral:

$$s=\int_{s(250 s)}^{s(251 s)} ds = \int_{250 s}^{251 s} v(t) dt$$ In order to evaluate this, you need to know the speed or velocity profile, $s(t)$ or $v(t)$ during your ride (or at least during the time from 250 s to 251 s). As pointed out above, there is not enough information to extract this from the text given.

Example calculation for uniformly increasing/decreasing velocity

In order to calculate something, we could assume that we start with zero velocity at the start, accelerate at constant acceleration ($a$) until 300 seconds, decelerate at constant (negative) acceleration ($-a$) and end at zero velocity at the finish. Geometrically this means that the blue curves are made out of two parabolas (one for acceleration and deceleration respectively).

In that case for the acceleration part, until 300 seconds your motion is given by:

$$s(t)=\frac{1}{2}at^2,~~v(t)=at$$

After 300 seconds you reach a distance $s_{300}=\frac{1}{2}a (300~s)^2$ and a maximum velocity of $v_{300}=a(300~s)$

The motion for the second part would be: $$s(t)=s_{300}+v_{300}(t-300~s)-\frac{1}{2} a (t-300~s)^2\\ v(t)=v_{300}-a(t-300~s)$$

With the condition that you reach 900 meters after 600 s,

$$900~m = s_{300}+v_{300}(300~s)-\frac{1}{2} a (300~s)^2\\ =\frac{1}{2}a (300~s)^2+a(300~s)^2-\frac{1}{2} a (300~s)^2\\ =a(300~s)^2$$

you get for the acceleration: $a=0.01~m/s^2$.

Putting this back into the equation for the distance covered between 250 and 251 seconds:

$$s=\int_{250 s}^{251 s} v(t) dt\\ =\int_{250 s}^{251 s} at dt\\ =\frac{1}{2}at^2|_{250 s}^{251 s}\\ =\frac{1}{2}0.01~(251^2-250^2)~m\\ =2.505~m$$

The calculation for arbitrary non-uniform motion basically works in the same way: you need to find $v(t)$ or $s(t)$ and integrate over the time interval you are interested in. The example here is probably the easiest possible form of non-uniform motion. You can assume other forms for $v(t)$ and do the calculation.

Or do an experiment and measure the distance as a function of time (e.g. every few seconds), plot the data points, draw a smooth curve through them, draw a tangent to the curve at a point you are interested in, calculate the slope of the tangent... I believe there are apps that do that for you based on GPS data.

I think you mean that you increase your speed uniformly over time. Your average speed is still $1.5m/s$. This is your speed at half the time. Your total time is still $300s$.

Your average speed over any time interval is equal to your speed at the middle of that time interval. You can find this by proportions. So at the middle of the 250th second (ie 250-251s) your average speed is $\frac{250.5s}{150s}\times\text{your speed at 150s}$. You can use this to work out your distance covered during the 250th second : $\text{distance = average speed x time}$.

If your speed changes at a variable rate then in general you need to use an extension of iacopo's method.

The device you could use is an accelerometer, which can often be found in a smart phone. Your phone records acceleration $a$ vs time $t$ at fixed intervals $\Delta t$.

Suppose you have $N+1$ values of acceleration, starting with $a_0$ and ending with $a_N$. The average acceleration during interval $i$ is (approximately) $\frac12(a_{i-1}+a_i)$. The change in speed during this interval is $\frac12(a_{i-1}+a_i)\Delta t$. The speed at the end of each interval is $$v_i=v_{i-1}+\frac12(a_{i-1}+a_i)\Delta t$$ The starting speed is $v_0$, which is probably zero.

The distance travelled during each interval is the average speed in that interval times the time interval. So the accumulated distance at the end of each interval is $$x_i=x_{i-1}+\frac12(v_{i-1}+v_i)\Delta t$$ The initial distance $x_0$ is again probably zero.

If you can transfer your data to a spreadsheet, these calculations can be performed quickly.

Theorically: I think you are speaking about Instantaneous Speed ($v(t)$) vs Average Speed ($v_{avg}(t)$). If we call $s(t)$ the position at a given time and $t$ the time. We can find: $$v_{avg}(t)=\frac{\Delta s}{\Delta t}$$ To have a measure of your instantaneous speed you should know the position profile of your motion and then derive it. Evaluating the speed function at a given time $t$ you know your instantaneous speed.

$$v(t)=\frac{ds(t)}{dt}$$

If you want to know exactly the position you covered in a given interval of time you should integrate the speed profile using as bounds the desired times.

$$\Delta s_{interval}=\int_{t_{start}}^{t_{stop}}v(t)dt$$

There are different devices to do that. Just google it.