This is a old one, but it is rare to find the general solution:

Consider a string (a fuse) that, when burned from one extreme, takes one hour to burn, but irregularly (some pieces burn faster than another). Get two strings of this kind. The irregularities are different, you are only granted the one hour time for each whole fuse.

1) How do you measure 15 minutes using both strings?

Spoiler

HINT: you can always access the whole string.
HINT2: yes, I know the original question asks for 45 minutes. It is the same question, moving the origin of time. But now go to question 2

2)

Spoiler

And 15 minutes with only one string?

3) Give general formulae for all the time intervals you are able to measure.

Assume string 1 has ends A and B, and string 2 has ends C and D. Light A, B, and C. When string 1 is consumed, light D. The difference in time from when string 1 is consumed and string 2 is consumed is 15 minutes. That's the standard way, anyway.

Measuring with 1 string:

Spoiler

Measuring with 1 string is difficult from a realistic perspective, but possible in theory. Light both A and B, and some arbitrary point along the string, probably the middle. Then, when one half of the string is consumed, light the midpoint of the remaining string. Repeat until all the string pieces are consumed, and it will have taken 15 minutes.

Similarly, with 1 string, you could measure 1 hour, 1/2 an hour, 1/4 of an hour, 1/6 of an hour, 1/8 of an hour, etc, by lighting more midpoints and keeping the same number of "fires" going at the same time. For 1 hour, you need 1 flame. For 1/2 an hour, you need 2. For 1/4 of an hour, you need 4 flames, etc.

You could also measure 1/3 of an hour, 1/5 of an hour, etc, by lighting one end and one midpoint of the string, and whenever one of the strings is extinguished, light the midpoint of one of the unconsumed strings. And if the consumed string had 1 end lit (instead of both), then extinguish one of the existing ends at the same time that you light the midpoint of one of the strings.

Of course, all these techniques are pretty difficult to make a case for realistically. They work mathematically, but in reality, you'd be scurrying around lighting strings and be getting some increasingly inaccurate measurements the shorter the time period you were trying to measure.

[edit]
Ok, general case, sorry--
With 1 string, you can measure 1/N hours, for any integer N (within reason, depending on how super-human you are). And with 2 strings, you can measure 1/N+1/M hours or 1/N-1/M hours, for any reasonable integers N and M.
[/edit]

Indeed If it is true that this question was in its origin an interview question, I wonder if it was convenient to give the full answer...

Moreover, it feels as if it could be connected to Bohr-Sommelfeld quantum mechanics, as the Rydberg series of spectral lines are labeled with square inverses, 1/N^2 - 1/M^2.