Finding the difference in time between two events for a specific ID
Some general suggestions:


Run the code through pycodestyle to get several suggestions for writing idiomatic Python:



  indentation is not a multiple of four


  missing whitespace after ','


  multiple spaces after operator


  line too long


  do not use bare except' [sic]


  block comment should start with '# '


Don't use single letter variables - it makes it very hard to maintain the code.
Don't shadow common names like time - if you ever need the time module in the code you'll have to rename the import or your variable.
You have unnecessary outer parens in the time = … line.
Indexing by a non-trivial expression is confusing. Assign x.id == j to a variable first so the maintainer knows what it means.
feature_final is accessed like a global. You should instead pass it in.
If you're processing a huge list you might want to try returning an iterable instead of a list - that way other code can start processing the output before it's complete.