This is a bit more complex, but has several differences over the above answer: it can bridge midnight, handle intervals that aren't factors of 60 (try the above with an interval of 7), and uses a recursive CTE to generate the numbers instead of a WHILE loop.
Its a shame about the INT datatype, with all the bonuses of TSQL's TIME datatype. You could do away with the helper functions.
The MAXRECURSION option is sometimes problematic, as you can't use it inside of a view... the calling statement has to specify it. To get around this, wrap it in a multi-statement table-valued function. see this post
CREATE FUNCTION dbo.ConvertIntToTime (@TimeAsInt INT)
RETURNS TIME
BEGIN
DECLARE @TimeString VARCHAR(4) = RIGHT(REPLICATE('0',4) + CAST(@TimeAsInt AS VARCHAR(4)),4);
RETURN PARSE(LEFT(@TimeString,2) + ':' + RIGHT(@TimeString,2) AS TIME);
END;
GO
CREATE FUNCTION dbo.ConvertTimeToInt (@Time TIME)
RETURNS INT
BEGIN
DECLARE @TimeString VARCHAR(5) = CONVERT(VARCHAR(5), @Time, 108);
RETURN PARSE(LEFT(@TimeString,2) + RIGHT(@TimeString,2) AS INT);
END;
GO
DECLARE @CurrentTime AS INT = 900;
DECLARE @EndTime AS INT = 1700;
DECLARE @Interval AS INT = 10;
DECLARE @CurrentTimeAsTime TIME = dbo.ConvertIntToTime(@CurrentTime);
DECLARE @EndTimeAsTime TIME = dbo.ConvertIntToTime(@EndTime);
WITH CTEGenerateTimes AS
(
SELECT @CurrentTimeAsTime Time
UNION ALL
SELECT DATEADD(MINUTE, @Interval, Time) AS TIME
FROM CTEGenerateTimes
WHERE (@EndTimeAsTime >= @CurrentTimeAsTime AND DATEADD(MINUTE, @Interval, Time) <= @EndTimeAsTime AND DATEADD(MINUTE, @Interval, Time) <> CAST('00:00' AS TIME)) --Range doesn't cross midnight
OR (@EndTimeAsTime < @CurrentTimeAsTime AND DATEADD(MINUTE, @Interval, Time) > @CurrentTimeAsTime AND DATEADD(MINUTE, @Interval, Time) <= CAST('23:59:59' AS TIME)) --Range crosses midnight, portion before midnight
OR (@EndTimeAsTime < @CurrentTimeAsTime AND DATEADD(MINUTE, @Interval, Time) <= @CurrentTimeAsTime AND DATEADD(MINUTE, @Interval, Time) <= @EndTimeAsTime)
)
SELECT dbo.ConvertTimeToInt(t.Time) Time
FROM CTEGenerateTimes t
OPTION (MAXRECURSION 1441)